Skip to content

Commit 4db4b1a

Browse files
ebiedermaxboe
authored andcommitted
signal: don't allow STOP on PF_IO_WORKER threads
Just like we don't allow normal signals to IO threads, don't deliver a STOP to a task that has PF_IO_WORKER set. The IO threads don't take signals in general, and have no means of flushing out a stop either. Longer term, we may want to look into allowing stop of these threads, as it relates to eg process freezing. For now, this prevents a spin issue if a SIGSTOP is delivered to the parent task. Reported-by: Stefan Metzmacher <[email protected]> Signed-off-by: Jens Axboe <[email protected]> Signed-off-by: "Eric W. Biederman" <[email protected]>
1 parent 5be28c8 commit 4db4b1a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/signal.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,8 @@ bool task_set_jobctl_pending(struct task_struct *task, unsigned long mask)
288288
JOBCTL_STOP_SIGMASK | JOBCTL_TRAPPING));
289289
BUG_ON((mask & JOBCTL_TRAPPING) && !(mask & JOBCTL_PENDING_MASK));
290290

291-
if (unlikely(fatal_signal_pending(task) || (task->flags & PF_EXITING)))
291+
if (unlikely(fatal_signal_pending(task) ||
292+
(task->flags & (PF_EXITING | PF_IO_WORKER))))
292293
return false;
293294

294295
if (mask & JOBCTL_STOP_SIGMASK)

0 commit comments

Comments
 (0)