Skip to content

Commit 5be28c8

Browse files
committed
signal: don't allow sending any signals to PF_IO_WORKER threads
They don't take signals individually, and even if they share signals with the parent task, don't allow them to be delivered through the worker thread. Linux does allow this kind of behavior for regular threads, but it's really a compatability thing that we need not care about for the IO threads. Reported-by: Stefan Metzmacher <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent de75a3d commit 5be28c8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kernel/signal.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,9 @@ static int check_kill_permission(int sig, struct kernel_siginfo *info,
833833

834834
if (!valid_signal(sig))
835835
return -EINVAL;
836+
/* PF_IO_WORKER threads don't take any signals */
837+
if (t->flags & PF_IO_WORKER)
838+
return -ESRCH;
836839

837840
if (!si_fromuser(info))
838841
return 0;

0 commit comments

Comments
 (0)