io_uring: fix merge error in checking send/recv addr2 flags
Jens Axboe
maintainerPATCH 1/1 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]>
---
fs/io_uring.c +0 -4
@@ -6077,8 +6077,6 @@ static int io_sendmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)if (unlikely (sqe->file_index))return -EINVAL ; -if (unlikely (sqe->addr2 || sqe->file_index)) -return -EINVAL ; sr->umsg =u64_to_user_ptr (READ_ONCE (sqe->addr)); 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)if (unlikely (sqe->file_index))return -EINVAL ; -if (unlikely (sqe->addr2 || sqe->file_index)) -return -EINVAL ; sr->umsg =u64_to_user_ptr (READ_ONCE (sqe->addr)); sr->len =READ_ONCE (sqe->len);
Signature · 1 line
Jens Axboe