Skip to content

Commit 0169d8f

Browse files
axboecschaufler
authored andcommitted
Revert "Smack: Handle io_uring kernel thread privileges"
This reverts commit 942cb35. 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 <[email protected]> Signed-off-by: Jens Axboe <[email protected]> Signed-off-by: Casey Schaufler <[email protected]>
1 parent 49ec114 commit 0169d8f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

security/smack/smack_access.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -688,10 +688,9 @@ bool smack_privileged_cred(int cap, const struct cred *cred)
688688
bool smack_privileged(int cap)
689689
{
690690
/*
691-
* Kernel threads may not have credentials we can use.
692-
* The io_uring kernel threads do have reliable credentials.
691+
* All kernel tasks are privileged
693692
*/
694-
if ((current->flags & (PF_KTHREAD | PF_IO_WORKER)) == PF_KTHREAD)
693+
if (unlikely(current->flags & PF_KTHREAD))
695694
return true;
696695

697696
return smack_privileged_cred(cap, current_cred());

0 commit comments

Comments
 (0)