Skip to content

Commit a52d4f6

Browse files
committed
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: cf30da9 ("io_uring: add support for IORING_OP_LINKAT") Cc: stable@vger.kernel.org Reported-by: Thomas Leonard <talex5@gmail.com> Link: axboe/liburing#955 Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent c21a802 commit a52d4f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

io_uring/fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ int io_linkat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
243243
struct io_link *lnk = io_kiocb_to_cmd(req, struct io_link);
244244
const char __user *oldf, *newf;
245245

246-
if (sqe->rw_flags || sqe->buf_index || sqe->splice_fd_in)
246+
if (sqe->buf_index || sqe->splice_fd_in)
247247
return -EINVAL;
248248
if (unlikely(req->flags & REQ_F_FIXED_FILE))
249249
return -EBADF;

0 commit comments

Comments
 (0)