IO-Uring Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] Remove superfluous check for sqe->off in io_accept()
@ 2019-11-25 19:40 Hrvoje Zeba
  2019-11-25 19:42 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Hrvoje Zeba @ 2019-11-25 19:40 UTC (permalink / raw)
  To: io-uring; +Cc: Hrvoje Zeba

This field contains a pointer to addrlen and checking to see if it's set
returns -EINVAL if the caller sets addr & addrlen pointers.

Signed-off-by: Hrvoje Zeba <zeba.hrvoje@gmail.com>
---
 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 e5bff60f61d6..8cb8f3898c77 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1963,7 +1963,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);
-- 
2.24.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Remove superfluous check for sqe->off in io_accept()
  2019-11-25 19:40 [PATCH] Remove superfluous check for sqe->off in io_accept() Hrvoje Zeba
@ 2019-11-25 19:42 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2019-11-25 19:42 UTC (permalink / raw)
  To: Hrvoje Zeba, io-uring

On 11/25/19 12:40 PM, Hrvoje Zeba wrote:
> This field contains a pointer to addrlen and checking to see if it's set
> returns -EINVAL if the caller sets addr & addrlen pointers.

Thanks, applied with a Fixes tag added (and io_uring: prefix on subject).

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-25 19:40 [PATCH] Remove superfluous check for sqe->off in io_accept() Hrvoje Zeba
2019-11-25 19:42 ` Jens Axboe

IO-Uring Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/io-uring/0 io-uring/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 io-uring io-uring/ https://lore.kernel.org/io-uring \
		io-uring@vger.kernel.org
	public-inbox-index io-uring

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.io-uring


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git