summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2023-09-28 18:23:27 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-10-06 15:57:02 +0300
commit75c307d9f2fbb949cb8713b8f659fec5f21f2c34 (patch)
tree5a2bea14a6848f457947abdacf76187633097a64 /io_uring
parent06fba8a8dea22c2260785cafd74e6d42ac38711a (diff)
downloadlinux-75c307d9f2fbb949cb8713b8f659fec5f21f2c34.tar.xz
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") 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>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/fs.c b/io_uring/fs.c
index 7100c293c13a..27676e015004 100644
--- a/io_uring/fs.c
+++ b/io_uring/fs.c
@@ -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;