[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3d17a814-2300-4902-8b2c-2a73c0e9bfc4@moroto.mountain>
Date: Fri, 1 Mar 2024 18:29:52 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Jens Axboe <axboe@...nel.dk>
Cc: Pavel Begunkov <asml.silence@...il.com>, io-uring@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH 2/2] io_uring/net: remove unnecessary check
"namelen" is type size_t so it can't be negative.
Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
---
io_uring/net.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/io_uring/net.c b/io_uring/net.c
index da257bf429d5..04a7426c80d2 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -557,8 +557,6 @@ static int io_recvmsg_mshot_prep(struct io_kiocb *req,
(REQ_F_APOLL_MULTISHOT|REQ_F_BUFFER_SELECT)) {
int hdr;
- if (unlikely(namelen < 0))
- return -EOVERFLOW;
if (check_add_overflow(sizeof(struct io_uring_recvmsg_out),
namelen, &hdr))
return -EOVERFLOW;
--
2.43.0
Powered by blists - more mailing lists