Commit 86bcacc9 authored by Muhammad Usama Anjum's avatar Muhammad Usama Anjum Committed by Jens Axboe

io_uring/net: correct the type of variable

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: c5597802 ("io_uring/net: move receive multishot out of the generic msghdr path")
Signed-off-by: default avatarMuhammad Usama Anjum <usama.anjum@collabora.com>
Link: https://lore.kernel.org/r/20240301144349.2807544-1-usama.anjum@collabora.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 3fcb9d17
......@@ -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)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment