diff mbox series

[PATCH io_uring/net: correct the type of variable

Message ID 20240301144349.2807544-1-usama.anjum@collabora.com (mailing list archive)
State New
Headers show
Series [PATCH io_uring/net: correct the type of variable | expand

Commit Message

Muhammad Usama Anjum March 1, 2024, 2:43 p.m. UTC
The namelen is of type int. It shouldn't be made size_t which is
unsigned. The signed number is needed for error checking before use.

Fixes: c55978024d12 ("io_uring/net: move receive multishot out of the generic msghdr path")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
---
 io_uring/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jens Axboe March 1, 2024, 3:55 p.m. UTC | #1
On Fri, 01 Mar 2024 19:43:48 +0500, Muhammad Usama Anjum wrote:
> The namelen is of type int. It shouldn't be made size_t which is
> unsigned. The signed number is needed for error checking before use.
> 
> 

Applied, thanks!

[1/1] [PATCH io_uring/net: correct the type of variable
      commit: e86b4a164fc86d224bd177e02a9c070b9f1c3db4

Best regards,
diff mbox series

Patch

diff --git a/io_uring/net.c b/io_uring/net.c
index 926d1fb0335de..b4ca803d85e23 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -551,7 +551,7 @@  int io_send(struct io_kiocb *req, unsigned int issue_flags)
 
 static int io_recvmsg_mshot_prep(struct io_kiocb *req,
 				 struct io_async_msghdr *iomsg,
-				 size_t namelen, size_t controllen)
+				 int namelen, size_t controllen)
 {
 	if ((req->flags & (REQ_F_APOLL_MULTISHOT|REQ_F_BUFFER_SELECT)) ==
 			  (REQ_F_APOLL_MULTISHOT|REQ_F_BUFFER_SELECT)) {