Skip to content

Commit

Permalink
io_uring/fs: remove sqe->rw_flags checking from LINKAT
Browse files Browse the repository at this point in the history
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: [email protected]
Reported-by: Thomas Leonard <[email protected]>
Link: axboe/liburing#955
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Sep 29, 2023
1 parent c21a802 commit a52d4f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion io_uring/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a52d4f6

Please sign in to comment.