Skip to contentSkip to conversation

FAILED: patch "[PATCH] io_uring/fs: remove sqe->rw_flags checking from LINKAT" failed to apply to 5.15-stable tree

PATCH [email protected] 2 participants 3 messages Oct 4, 2023

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 5.15-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-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x a52d4f657568d6458e873f74a9602e022afe666f
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2023100446-broiler-liquid-20a4@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From a52d4f657568d6458e873f74a9602e022afe666f Mon Sep 17 00:00:00 2001
From: Jens Axboe <[email protected]>
Date: Thu, 28 Sep 2023 09:23:27 -0600
Subject: [PATCH] io_uring/fs: remove sqe->rw_flags checking from LINKAT

This is unionized with the actual link flags, so they can of course be set and they will be evaluated further down. If not we fail any LINKAT that has to set option flags.

Fixes cf30da90bc3a ("io_uring: add support for IORING_OP_LINKAT")
io_uring/fs.c +1 -1
index f6a69a549fd4..08e3b175469c 100644
@@ -243,7 +243,7 @@ int io_linkat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
 	struct io_link *lnk = io_kiocb_to_cmd(req, struct io_link);
 	const char __user *oldf, *newf;
 
-	if (sqe->rw_flags || sqe->buf_index || sqe->splice_fd_in)
+	if (sqe->buf_index || sqe->splice_fd_in)
 		return -EINVAL;
 	if (unlikely(req->flags & REQ_F_FIXED_FILE))
 		return -EBADF;
maintainer
#1 lore raw
Quoted 6 lines · On 10/4/23 8:33 AM, [email protected] wrote:

The patch below does not apply to the 5.15-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]>.

Quoted 8 lines

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-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x a52d4f657568d6458e873f74a9602e022afe666f
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2023100446-broiler-liquid-20a4@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..

Here's one that applies (and works) against 5.15-stable, thanks.

Signature · 1 line
Jens Axboe

From 6f3d95f8d691f1436c8ba3c14060cdce267bec38 Mon Sep 17 00:00:00 2001
From: Jens Axboe <[email protected]>
Date: Wed, 4 Oct 2023 08:43:13 -0600
Subject: [PATCH] io_uring/fs: remove sqe->rw_flags checking from LINKAT

commit a52d4f657568d6458e873f74a9602e022afe666f upstream.

This is unionized with the actual link flags, so they can of course be set and they will be evaluated further down. If not we fail any LINKAT that has to set option flags.

Fixes cf30da90bc3a ("io_uring: add support for IORING_OP_LINKAT")
---
 io_uring/io_uring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
io_uring/io_uring.c +1 -1
index 1519125b9814..d00bedfdadbb 100644
@@ -4038,7 +4038,7 @@ static int io_linkat_prep(struct io_kiocb *req,
 
 	if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL))
 		return -EINVAL;
-	if (sqe->ioprio || sqe->rw_flags || sqe->buf_index || sqe->splice_fd_in)
+	if (sqe->ioprio || sqe->buf_index || sqe->splice_fd_in)
 		return -EINVAL;
 	if (unlikely(req->flags & REQ_F_FIXED_FILE))
 		return -EBADF;
Signature · 1 line
2.40.1
author maintainer
#2 lore raw
Quoted 9 lines · Jens Axboe
Quoted 8 lines · On 10/4/23 8:33 AM, [email protected] wrote:

The patch below does not apply to the 5.15-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:

Quoted 8 lines
Quoted 6 lines

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x a52d4f657568d6458e873f74a9602e022afe666f
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2023100446-broiler-liquid-20a4@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..

Here's one that applies (and works) against 5.15-stable, thanks.

Thanks, now qeued up.

greg k-h