tomoyo: don't special case PF_IO_WORKER for PF_KTHREAD
authorJens Axboe <axboe@kernel.dk>
Fri, 26 Mar 2021 16:05:25 +0000 (10:05 -0600)
committerTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Sun, 28 Mar 2021 04:11:29 +0000 (13:11 +0900)
Since commit 3bfe6106693b6b4b ("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 <axboe@kernel.dk>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
security/tomoyo/network.c

index 478f757ff8435ea3d54b1c456f2d71646f537dd0..8dc61335f65e15387d0239d8e8e444ef2a5b3d77 100644 (file)
@@ -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;
 }
 
 /**