]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Oct 2023 14:54:26 +0000 (16:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Oct 2023 14:54:26 +0000 (16:54 +0200)
added patches:
io_uring-fs-remove-sqe-rw_flags-checking-from-linkat.patch

queue-5.15/io_uring-fs-remove-sqe-rw_flags-checking-from-linkat.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/io_uring-fs-remove-sqe-rw_flags-checking-from-linkat.patch b/queue-5.15/io_uring-fs-remove-sqe-rw_flags-checking-from-linkat.patch
new file mode 100644 (file)
index 0000000..03e1c3b
--- /dev/null
@@ -0,0 +1,34 @@
+From 6f3d95f8d691f1436c8ba3c14060cdce267bec38 Mon Sep 17 00:00:00 2001
+From: Jens Axboe <axboe@kernel.dk>
+Date: Wed, 4 Oct 2023 08:43:13 -0600
+Subject: io_uring/fs: remove sqe->rw_flags checking from LINKAT
+
+From: Jens Axboe <axboe@kernel.dk>
+
+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")
+Cc: stable@vger.kernel.org
+Reported-by: Thomas Leonard <talex5@gmail.com>
+Link: https://github.com/axboe/liburing/issues/955
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ io_uring/io_uring.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/io_uring/io_uring.c
++++ b/io_uring/io_uring.c
+@@ -4038,7 +4038,7 @@ static int io_linkat_prep(struct io_kioc
+       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;
index 0ae7ce9c5268d2de9b74cfb825cf87dc06cf0d80..1aa015baaf62d4459fb74b44efc21aba6851f3f4 100644 (file)
@@ -166,3 +166,4 @@ ata-libata-scsi-ignore-reserved-bits-for-report-supported-operation-codes.patch
 i2c-i801-unregister-tco_pdev-in-i801_probe-error-path.patch
 kernel-sched-modify-initial-boot-task-idle-setup.patch
 sched-rt-fix-live-lock-between-select_fallback_rq-and-rt-push.patch
+io_uring-fs-remove-sqe-rw_flags-checking-from-linkat.patch