Skip to contentSkip to conversation

io_uring/fs: remove sqe->rw_flags checking from LINKAT

PATCH New Jens Axboe 1 participant 1 message Sep 28, 2023 io_uring

lore
Share & tools
lore

Jens Axboe

author maintainer
#0 lore raw

PATCH 1/1 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;
Signature · 1 line
Jens Axboe