]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring: reap poll completions while waiting for refs to drop on exit
authorJens Axboe <axboe@kernel.dk>
Wed, 17 Jun 2020 21:00:04 +0000 (15:00 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:49:20 +0000 (17:49 +0200)
commited065aeb981a44e6325ce3a3ee96606dcf7f95ed
treed96e5c1fd5083e03e4f8fc4dd2f573b85f39e670
parent775bc2f5802ffef7abff7df92894e6328fe0bdb5
io_uring: reap poll completions while waiting for refs to drop on exit

[ Upstream commit 56952e91acc93ed624fe9da840900defb75f1323 ]

If we're doing polled IO and end up having requests being submitted
async, then completions can come in while we're waiting for refs to
drop. We need to reap these manually, as nobody else will be looking
for them.

Break the wait into 1/20th of a second time waits, and check for done
poll completions if we time out. Otherwise we can have done poll
completions sitting in ctx->poll_list, which needs us to reap them but
we're just waiting for them.

Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c