Skip to content

Commit

Permalink
tomoyo: don't special case PF_IO_WORKER for PF_KTHREAD
Browse files Browse the repository at this point in the history
Since commit 3bfe610 ("io-wq: fork worker threads from original
task") stopped using PF_KTHREAD flag for the io_uring PF_IO_WORKER threads,
tomoyo_kernel_service() no longer needs to check PF_IO_WORKER flag.

(This is a 5.12+ patch. Please don't send to stable kernels.)

Signed-off-by: Jens Axboe <[email protected]>
Signed-off-by: Tetsuo Handa <[email protected]>
  • Loading branch information
axboe authored and Tetsuo Handa committed Mar 28, 2021
1 parent 0f4498c commit 4e53d17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/tomoyo/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ static int tomoyo_check_unix_address(struct sockaddr *addr,
static bool tomoyo_kernel_service(void)
{
/* Nothing to do if I am a kernel service. */
return (current->flags & (PF_KTHREAD | PF_IO_WORKER)) == PF_KTHREAD;
return current->flags & PF_KTHREAD;
}

/**
Expand Down

0 comments on commit 4e53d17

Please sign in to comment.