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