]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring: use right task for exiting checks
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 10 Jul 2021 01:45:59 +0000 (02:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:02:02 +0000 (16:02 +0200)
commit9dac3c1ab15521e5eec262fe6727e03035dadef7
treeab8f70d8cc61cdc930bcb309aa0ccdf010bcdb90
parenta495e562d402f0c96812ef83841ea13ae0e9e25d
io_uring: use right task for exiting checks

commit 9c6882608bce249a8918744ecdb65748534e3f17 upstream.

When we use delayed_work for fallback execution of requests, current
will be not of the submitter task, and so checks in io_req_task_submit()
may not behave as expected. Currently, it leaves inline completions not
flushed, so making io_ring_exit_work() to hang. Use the submitter task
for all those checks.

Cc: stable@vger.kernel.org
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/cb413c715bed0bc9c98b169059ea9c8a2c770715.1625881431.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c