diff options
author | Hrvoje Zeba <zeba.hrvoje@gmail.com> | 2019-11-25 14:40:22 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-11-25 19:56:11 -0700 |
commit | 8042d6ce8c40df0abb0d91662a754d074a3d3f16 (patch) | |
tree | f1d99db1327f6bc4d4654788727769ee28ec6ab7 /fs | |
parent | 181e448d8709e517c9c7b523fcd209f24eb38ca7 (diff) | |
download | linux-8042d6ce8c40df0abb0d91662a754d074a3d3f16.tar.bz2 |
io_uring: remove superfluous check for sqe->off in io_accept()
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 <zeba.hrvoje@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/io_uring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index b6c6fdc12de7..7412fdefa35a 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1965,7 +1965,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); |