]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring/net: fix accept multishot handling
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 23 Feb 2025 17:22:29 +0000 (17:22 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Apr 2025 08:15:40 +0000 (10:15 +0200)
commit0828d6e9add67ce4f893c5fbb31ec6c23f34426c
tree4af79e42e0644068655c39655f30985ea4d8a384
parent00026f80c430077f7298262d14d783b33ec23342
io_uring/net: fix accept multishot handling

commit f6a89bf5278d6e15016a736db67043560d1b50d5 upstream.

REQ_F_APOLL_MULTISHOT doesn't guarantee it's executed from the multishot
context, so a multishot accept may get executed inline, fail
io_req_post_cqe(), and ask the core code to kill the request with
-ECANCELED by returning IOU_STOP_MULTISHOT even when a socket has been
accepted and installed.

Cc: stable@vger.kernel.org
Fixes: 390ed29b5e425 ("io_uring: add IORING_ACCEPT_MULTISHOT for accept")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/51c6deb01feaa78b08565ca8f24843c017f5bc80.1740331076.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/net.c