diff options
author | Jens Axboe <axboe@kernel.dk> | 2021-09-21 08:24:57 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-09-24 10:24:34 -0600 |
commit | 87c1696655787895689618c8b63c5efe66b8f2ab (patch) | |
tree | 85e994e7b72db03c4e0fa8a947b7c63f694c06bc /fs/io-wq.c | |
parent | e4e737bb5c170df6135a127739a9e6148ee3da82 (diff) | |
download | linux-87c1696655787895689618c8b63c5efe66b8f2ab.tar.bz2 |
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 <david@fromorbit.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io-wq.c')
-rw-r--r-- | fs/io-wq.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/io-wq.c b/fs/io-wq.c index c2e0e8e80949..c2360cdc403d 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; } |