]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring: fix multishots with selected buffers
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 10 Feb 2025 17:27:54 +0000 (17:27 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 12:49:53 +0000 (13:49 +0100)
commit233b210a678bddf8b49b02a070074a52b87e6d43
treef019aa86acc9578ea98f478cdc31062d48130a82
parent30ab0f6c90f89bfb5429c534cc70cef5478b0041
io_uring: fix multishots with selected buffers

[ upstream commit d63b0e8a628e62ca85a0f7915230186bb92f8bb4 ]

We do io_kbuf_recycle() when arming a poll but every iteration of a
multishot can grab more buffers, which is why we need to flush the kbuf
ring state before continuing with waiting.

Cc: stable@vger.kernel.org
Fixes: b3fdea6ecb55c ("io_uring: multishot recv")
Reported-by: Muhammad Ramdhan <ramdhan@starlabs.sg>
Reported-by: Bing-Jhong Billy Jheng <billy@starlabs.sg>
Reported-by: Jacob Soo <jacob.soo@starlabs.sg>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/1bfc9990fe435f1fc6152ca9efeba5eb3e68339c.1738025570.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/poll.c