]> git.hungrycats.org Git - linux/commit
io_uring: break out of iowq iopoll on teardown
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 7 Sep 2023 12:50:07 +0000 (13:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:48:39 +0000 (09:48 +0200)
commitdec70164ba7882e457756c30828b645e8fac0063
treeee6dfde03810a7f29dcb53a23d44ad74b6d73ca4
parent63059d272c4c70dff5f14caf49b245ae056f86cf
io_uring: break out of iowq iopoll on teardown

commit 45500dc4e01c167ee063f3dcc22f51ced5b2b1e9 upstream.

io-wq will retry iopoll even when it failed with -EAGAIN. If that
races with task exit, which sets TIF_NOTIFY_SIGNAL for all its workers,
such workers might potentially infinitely spin retrying iopoll again and
again and each time failing on some allocation / waiting / etc. Don't
keep spinning if io-wq is dying.

Fixes: 561fb04a6a225 ("io_uring: replace workqueue usage with io-wq")
Cc: stable@vger.kernel.org
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/io-wq.c
io_uring/io-wq.h
io_uring/io_uring.c