public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH io_uring/net: correct the type of variable
@ 2024-03-01 14:43 Muhammad Usama Anjum
  2024-03-01 15:55 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Muhammad Usama Anjum @ 2024-03-01 14:43 UTC (permalink / raw)
  To: Jens Axboe, Pavel Begunkov
  Cc: Muhammad Usama Anjum, kernel, kernel-janitors, io-uring,
	linux-kernel

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 <[email protected]>
---
 io_uring/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)) {
-- 
2.39.2


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

* Re: [PATCH io_uring/net: correct the type of variable
  2024-03-01 14:43 [PATCH io_uring/net: correct the type of variable Muhammad Usama Anjum
@ 2024-03-01 15:55 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2024-03-01 15:55 UTC (permalink / raw)
  To: Pavel Begunkov, Muhammad Usama Anjum
  Cc: kernel, kernel-janitors, io-uring, linux-kernel


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,
-- 
Jens Axboe




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

end of thread, other threads:[~2024-03-01 15:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-01 14:43 [PATCH io_uring/net: correct the type of variable Muhammad Usama Anjum
2024-03-01 15:55 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox