]> git.baikalelectronics.ru Git - kernel.git/commit
io-wq: exclusively gate signal based exit on get_signal() return
authorJens Axboe <axboe@kernel.dk>
Mon, 27 Sep 2021 16:04:10 +0000 (10:04 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 27 Sep 2021 17:03:43 +0000 (11:03 -0600)
commitd12255f754daf581a2ee7a394b6df6f881f47d4e
tree48df289241a4c4c339cb74be7cd6cfa75679d650
parentd247f468d1ebb5eb62bbd7e198591e4a4d99ef45
io-wq: exclusively gate signal based exit on get_signal() return

io-wq threads block all signals, except SIGKILL and SIGSTOP. We should not
need any extra checking of signal_pending or fatal_signal_pending, rely
exclusively on whether or not get_signal() tells us to exit.

The original debugging of this issue led to the false positive that we
were exiting on non-fatal signals, but that is not the case. The issue
was around races with nr_workers accounting.

Fixes: 5932d9d40062 ("io-wq: ensure we exit if thread group is exiting")
Fixes: afcedcab38b1 ("io-wq: only exit on fatal signals")
Reported-by: Eric W. Biederman <ebiederm@xmission.com>
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io-wq.c