]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix not released cached task refs
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 9 Jan 2022 00:53:22 +0000 (00:53 +0000)
committerJens Axboe <axboe@kernel.dk>
Sun, 9 Jan 2022 16:22:49 +0000 (09:22 -0700)
commit4d2490181542d26af9352573e38ca7a54a719b5a
tree1aee7597ac5ead8b7c94074b769911d356d7d782
parentc20d046ad08a0f8dcdb126309af52a462ff72b7f
io_uring: fix not released cached task refs

tctx_task_work() may get run after io_uring cancellation and so there
will be no one to put cached in tctx task refs that may have been added
back by tw handlers using inline completion infra, Call
io_uring_drop_tctx_refs() at the end of the main tw handler to release
them.

Cc: stable@vger.kernel.org # 5.15+
Reported-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Fixes: 8a07a7e4e177 ("io_uring: extend task put optimisations")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/69f226b35fbdb996ab799a8bbc1c06bf634ccec1.1641688805.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c