From e8da7bb38a28dc70a85228fed851eb22fcf7b30d Mon Sep 17 00:00:00 2001 From: Hrvoje Zeba Date: Mon, 25 Nov 2019 14:40:22 -0500 Subject: [PATCH 1051/2944] io_uring: remove superfluous check for sqe->off in io_accept() to #26323578 commit 8042d6ce8c40df0abb0d91662a754d074a3d3f16 upstream. This field contains a pointer to addrlen and checking to see if it's set returns -EINVAL if the caller sets addr & addrlen pointers. Fixes: 17f2fe35d080 ("io_uring: add support for IORING_OP_ACCEPT") Signed-off-by: Hrvoje Zeba Signed-off-by: Jens Axboe Signed-off-by: Joseph Qi Acked-by: Xiaoguang Wang --- fs/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/io_uring.c b/fs/io_uring.c index e20f42f..0ae2073 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1961,7 +1961,7 @@ static int io_accept(struct io_kiocb *req, const struct io_uring_sqe *sqe, if (unlikely(req->ctx->flags & (IORING_SETUP_IOPOLL|IORING_SETUP_SQPOLL))) return -EINVAL; - if (sqe->ioprio || sqe->off || sqe->len || sqe->buf_index) + if (sqe->ioprio || sqe->len || sqe->buf_index) return -EINVAL; addr = (struct sockaddr __user *) (unsigned long) READ_ONCE(sqe->addr); -- 1.8.3.1