Skip to content

Commit 87c1696

Browse files
committed
io-wq: ensure we exit if thread group is exiting
Dave reports that a coredumping workload gets stuck in 5.15-rc2, and identified the culprit in the Fixes line below. The problem is that relying solely on fatal_signal_pending() to gate whether to exit or not fails miserably if a process gets eg SIGILL sent. Don't exclusively rely on fatal signals, also check if the thread group is exiting. Fixes: 15e20db ("io-wq: only exit on fatal signals") Reported-by: Dave Chinner <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent e4e737b commit 87c1696

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/io-wq.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,8 @@ static int io_wqe_worker(void *data)
584584

585585
if (!get_signal(&ksig))
586586
continue;
587-
if (fatal_signal_pending(current))
587+
if (fatal_signal_pending(current) ||
588+
signal_group_exit(current->signal))
588589
break;
589590
continue;
590591
}

0 commit comments

Comments
 (0)