FAILED: patch "[PATCH] io_uring: fix off-by one bvec index" failed to apply to 6.1-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x d6fef34ee4d102be448146f24caf96d7b4a05401
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2023113023-heaviness-easel-554e@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
d6fef34ee4d1 ("io_uring: fix off-by one bvec index") 57bebf807e2a ("io_uring/rsrc: optimise registered huge pages") b000ae0ec2d7 ("io_uring/rsrc: optimise single entry advance")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From d6fef34ee4d102be448146f24caf96d7b4a05401 Mon Sep 17 00:00:00 2001
From: Keith Busch <[email protected]>
Date: Mon, 20 Nov 2023 14:18:31 -0800
Subject: [PATCH] io_uring: fix off-by one bvec index
If the offset equals the bv_len of the first registered bvec, then the request does not include any of that first bvec. Skip it so that drivers don't have to deal with a zero length bvec, which was observed to break NVMe's PRP list creation.
io_uring/rsrc.c +1 -1
@@ -1258,7 +1258,7 @@ int io_import_fixed(int ddir, struct iov_iter *iter,*/ const struct bio_vec *bvec = imu->bvec; -if (offset <= bvec->bv_len) { +if (offset < bvec->bv_len) {/* * Note, huge pages buffers consists of one large * bvec entry and should always go this way. The other
Jens Axboe
maintainerQuoted 2 lines · On 11/30/23 7:31 AM, [email protected] wrote:
The patch below does not apply to the 6.1-stable tree.
Already tested these, here's the 6.1 variant.
Signature · 1 line
Jens Axboe
From 01636029775bcf023da73a6c094a371a0408ae0e Mon Sep 17 00:00:00 2001
From: Keith Busch <[email protected]>
Date: Mon, 20 Nov 2023 14:18:31 -0800
Subject: [PATCH] io_uring: fix off-by one bvec index
commit d6fef34ee4d102be448146f24caf96d7b4a05401 upstream.
If the offset equals the bv_len of the first registered bvec, then the request does not include any of that first bvec. Skip it so that drivers don't have to deal with a zero length bvec, which was observed to break NVMe's PRP list creation.
--- io_uring/rsrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
io_uring/rsrc.c +1 -1
@@ -1351,7 +1351,7 @@ int io_import_fixed(int ddir, struct iov_iter *iter,*/ const struct bio_vec *bvec = imu->bvec; -if (offset <= bvec->bv_len) { +if (offset < bvec->bv_len) {iov_iter_advance (iter, offset); }else {unsigned long seg_skip;
Signature · 1 line
2.42.0