io_uring: initialise msghdr::msg_ubuf
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 12 Jul 2022 20:52:36 +0000 (21:52 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jul 2022 00:41:06 +0000 (18:41 -0600)
Initialise newly added ->msg_ubuf in io_recv() and io_send().

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/b8f9f263875a4a36e7f26cc5d55ebe315308f57d.1657643355.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/net.c

index e61efa3..bbc9c60 100644 (file)
@@ -294,6 +294,7 @@ int io_send(struct io_kiocb *req, unsigned int issue_flags)
        msg.msg_control = NULL;
        msg.msg_controllen = 0;
        msg.msg_namelen = 0;
+       msg.msg_ubuf = NULL;
 
        flags = sr->msg_flags;
        if (issue_flags & IO_URING_F_NONBLOCK)
@@ -783,6 +784,7 @@ retry_multishot:
        msg.msg_flags = 0;
        msg.msg_controllen = 0;
        msg.msg_iocb = NULL;
+       msg.msg_ubuf = NULL;
 
        flags = sr->msg_flags;
        if (force_nonblock)