summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorMuhammad Usama Anjum <usama.anjum@collabora.com>2024-03-01 17:43:48 +0300
committerSasha Levin <sashal@kernel.org>2024-03-27 01:20:57 +0300
commitb5a579ddf0bf52c0fe17ec85ea92644501125aba (patch)
treefee9cc0fb5bcfc8fdc66e1c9257d636465a42714 /io_uring
parent31db25e3141b20e2a76a9f219eeca52e3cab126c (diff)
downloadlinux-b5a579ddf0bf52c0fe17ec85ea92644501125aba.tar.xz
io_uring/net: correct the type of variable
[ Upstream commit 86bcacc957fc2d0403aa0e652757eec59a5fd7ca ] 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> Link: https://lore.kernel.org/r/20240301144349.2807544-1-usama.anjum@collabora.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/net.c b/io_uring/net.c
index 9fc0ffb0b6c1..0d4ee3d738fb 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -516,7 +516,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)) {