Patch "io_uring/net: fix notif cqe reordering" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    io_uring/net: fix notif cqe reordering

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     io_uring-net-fix-notif-cqe-reordering.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From foo@baz Mon Oct 17 11:35:32 AM CEST 2022
From: Pavel Begunkov <asml.silence@xxxxxxxxx>
Date: Sun, 16 Oct 2022 21:33:30 +0100
Subject: io_uring/net: fix notif cqe reordering
To: stable@xxxxxxxxxxxxxxx
Cc: Jens Axboe <axboe@xxxxxxxxx>, asml.silence@xxxxxxxxx
Message-ID: <54ecb468aac60ed3f6165be94144044cf62bbe58.1665951939.git.asml.silence@xxxxxxxxx>

From: Pavel Begunkov <asml.silence@xxxxxxxxx>

[ upstream commit 108893ddcc4d3aa0a4a02aeb02d478e997001227 ]

send zc is not restricted to !IO_URING_F_UNLOCKED anymore and so
we can't use task-tw ordering trick to order notification cqes
with requests completions. In this case leave it alone and let
io_send_zc_cleanup() flush it.

Cc: stable@xxxxxxxxxxxxxxx
Fixes: 53bdc88aac9a2 ("io_uring/notif: order notif vs send CQEs")
Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx>
Link: https://lore.kernel.org/r/0031f3a00d492e814a4a0935a2029a46d9c9ba06.1664486545.git.asml.silence@xxxxxxxxx
Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 io_uring/net.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -1073,8 +1073,14 @@ int io_send_zc(struct io_kiocb *req, uns
 	else if (zc->done_io)
 		ret = zc->done_io;
 
-	io_notif_flush(zc->notif);
-	req->flags &= ~REQ_F_NEED_CLEANUP;
+	/*
+	 * If we're in io-wq we can't rely on tw ordering guarantees, defer
+	 * flushing notif to io_send_zc_cleanup()
+	 */
+	if (!(issue_flags & IO_URING_F_UNLOCKED)) {
+		io_notif_flush(zc->notif);
+		req->flags &= ~REQ_F_NEED_CLEANUP;
+	}
 	io_req_set_res(req, ret, IORING_CQE_F_MORE);
 	return IOU_OK;
 }


Patches currently in stable-queue which might be from asml.silence@xxxxxxxxx are

queue-6.0/io_uring-correct-pinned_vm-accounting.patch
queue-6.0/io_uring-net-fix-notif-cqe-reordering.patch
queue-6.0/io_uring-net-don-t-update-msg_name-if-not-provided.patch
queue-6.0/io_uring-rw-fix-unexpected-link-breakage.patch
queue-6.0/io_uring-net-don-t-skip-notifs-for-failed-requests.patch
queue-6.0/io_uring-net-rename-io_sendzc.patch
queue-6.0/io_uring-net-refactor-io_sr_msg-types.patch
queue-6.0/io_uring-fix-cqe-reordering.patch
queue-6.0/io_uring-net-don-t-lose-partial-send-recv-on-fail.patch
queue-6.0/io_uring-rw-don-t-lose-partial-io-result-on-fail.patch
queue-6.0/io_uring-net-fix-fast_iov-assignment-in-io_setup_async_msg.patch
queue-6.0/io_uring-net-don-t-lose-partial-send_zc-on-fail.patch
queue-6.0/io_uring-limit-registration-w-single_issuer.patch
queue-6.0/io_uring-net-use-io_sr_msg-for-sendzc.patch
queue-6.0/io_uring-add-custom-opcode-hooks-on-fail.patch
queue-6.0/io_uring-rw-don-t-lose-short-results-on-io_setup_async_rw.patch
queue-6.0/io_uring-af_unix-defer-registered-files-gc-to-io_uring-release.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux