Skip to content

Commit b60cac1

Browse files
committed
io_uring: fix merge error in checking send/recv addr2 flags
With the dropping of the IOPOLL checking in the per-opcode handlers, we inadvertently left two checks in the recv/recvmsg and send/sendmsg prep handlers for the same thing, and one of them includes addr2 which holds the flags for these opcodes. Fix it up and kill the redundant checks. Signed-off-by: Jens Axboe <[email protected]>
1 parent 1bacd26 commit b60cac1

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

fs/io_uring.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6077,8 +6077,6 @@ static int io_sendmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
60776077

60786078
if (unlikely(sqe->file_index))
60796079
return -EINVAL;
6080-
if (unlikely(sqe->addr2 || sqe->file_index))
6081-
return -EINVAL;
60826080

60836081
sr->umsg = u64_to_user_ptr(READ_ONCE(sqe->addr));
60846082
sr->len = READ_ONCE(sqe->len);
@@ -6315,8 +6313,6 @@ static int io_recvmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
63156313

63166314
if (unlikely(sqe->file_index))
63176315
return -EINVAL;
6318-
if (unlikely(sqe->addr2 || sqe->file_index))
6319-
return -EINVAL;
63206316

63216317
sr->umsg = u64_to_user_ptr(READ_ONCE(sqe->addr));
63226318
sr->len = READ_ONCE(sqe->len);

0 commit comments

Comments
 (0)