Skip to content
Snippets Groups Projects
Commit 0169d8f3 authored by Jens Axboe's avatar Jens Axboe Committed by Casey Schaufler
Browse files

Revert "Smack: Handle io_uring kernel thread privileges"


This reverts commit 942cb357.

The io_uring PF_IO_WORKER threads no longer have PF_KTHREAD set, so no
need to special case them for credential checks.

Cc: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
parent 49ec114a
No related branches found
No related tags found
No related merge requests found
......@@ -688,10 +688,9 @@ bool smack_privileged_cred(int cap, const struct cred *cred)
bool smack_privileged(int cap)
{
/*
* Kernel threads may not have credentials we can use.
* The io_uring kernel threads do have reliable credentials.
* All kernel tasks are privileged
*/
if ((current->flags & (PF_KTHREAD | PF_IO_WORKER)) == PF_KTHREAD)
if (unlikely(current->flags & PF_KTHREAD))
return true;
return smack_privileged_cred(cap, current_cred());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment