]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Apr 2025 06:39:59 +0000 (08:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Apr 2025 06:39:59 +0000 (08:39 +0200)
added patches:
io_uring-net-fix-accept-multishot-handling.patch

queue-6.1/io_uring-net-fix-accept-multishot-handling.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/io_uring-net-fix-accept-multishot-handling.patch b/queue-6.1/io_uring-net-fix-accept-multishot-handling.patch
new file mode 100644 (file)
index 0000000..2bc2d6e
--- /dev/null
@@ -0,0 +1,36 @@
+From 6a69d144661781a1e60228e26bb26985ca66723a Mon Sep 17 00:00:00 2001
+From: Pavel Begunkov <asml.silence@gmail.com>
+Date: Sun, 23 Feb 2025 17:22:29 +0000
+Subject: io_uring/net: fix accept multishot handling
+
+From: Pavel Begunkov <asml.silence@gmail.com>
+
+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 |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/io_uring/net.c
++++ b/io_uring/net.c
+@@ -1391,6 +1391,8 @@ retry:
+               goto retry;
+       io_req_set_res(req, ret, 0);
++      if (!(issue_flags & IO_URING_F_MULTISHOT))
++              return IOU_OK;
+       return IOU_STOP_MULTISHOT;
+ }
index 03dae7e0cc6bb968723214c0701f75c55e17fba9..03581b332720024c5b0984d1792e773f38464026 100644 (file)
@@ -243,3 +243,4 @@ drm-amdgpu-dma_buf-fix-page_link-check.patch
 drm-nouveau-prime-fix-ttm_bo_delayed_delete-oops.patch
 drm-sti-remove-duplicate-object-names.patch
 drm-i915-gvt-fix-unterminated-string-initialization-warning.patch
+io_uring-net-fix-accept-multishot-handling.patch