Skip to content

Commit 78f8876

Browse files
committed
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: 87c1696 ("io-wq: ensure we exit if thread group is exiting") Fixes: 15e20db ("io-wq: only exit on fatal signals") Reported-by: Eric W. Biederman <[email protected]> Reported-by: Linus Torvalds <[email protected]> Acked-by: "Eric W. Biederman" <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 7df778b commit 78f8876

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

fs/io-wq.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -584,10 +584,7 @@ static int io_wqe_worker(void *data)
584584

585585
if (!get_signal(&ksig))
586586
continue;
587-
if (fatal_signal_pending(current) ||
588-
signal_group_exit(current->signal))
589-
break;
590-
continue;
587+
break;
591588
}
592589
last_timeout = !ret;
593590
}

0 commit comments

Comments
 (0)