From: Jens Axboe Date: Tue, 21 Sep 2021 14:24:57 +0000 (-0600) Subject: io-wq: ensure we exit if thread group is exiting X-Git-Tag: accepted/tizen/unified/20230118.172025~6138^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=87c1696655787895689618c8b63c5efe66b8f2ab;p=platform%2Fkernel%2Flinux-rpi.git 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: 15e20db2e0ce ("io-wq: only exit on fatal signals") Reported-by: Dave Chinner Signed-off-by: Jens Axboe --- diff --git a/fs/io-wq.c b/fs/io-wq.c index c2e0e8e..c2360cd 100644 --- a/fs/io-wq.c +++ b/fs/io-wq.c @@ -584,7 +584,8 @@ loop: if (!get_signal(&ksig)) continue; - if (fatal_signal_pending(current)) + if (fatal_signal_pending(current) || + signal_group_exit(current->signal)) break; continue; }