]> git.itanic.dy.fi Git - linux-stable/commit
io_uring: recycle kbuf recycle on tw requeue
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 6 Sep 2022 16:11:17 +0000 (17:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 08:47:17 +0000 (10:47 +0200)
commitdde284a85f7bd8e39af5381ded106bd11376392f
tree2c24f7565ad6296d299c87f95a92dcf709b2b46b
parent89fcb70f1acd6b0bbf2f7bfbf45d7aa75a9bdcde
io_uring: recycle kbuf recycle on tw requeue

[ Upstream commit 336d28a8f38013a069f2d46e73aaa1880ef17a47 ]

When we queue a request via tw for execution it's not going to be
executed immediately, so when io_queue_async() hits IO_APOLL_READY
and queues a tw but doesn't try to recycle/consume the buffer some other
request may try to use the the buffer.

Fixes: c7fb19428d67 ("io_uring: add support for ring mapped supplied buffers")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/a19bc9e211e3184215a58e129b62f440180e9212.1662480490.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
io_uring/io_uring.c