]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
io_uring/net: save msg_control for compat
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 25 Feb 2025 15:59:02 +0000 (15:59 +0000)
committerJens Axboe <axboe@kernel.dk>
Tue, 25 Feb 2025 16:03:51 +0000 (09:03 -0700)
Match the compat part of io_sendmsg_copy_hdr() with its counterpart and
save msg_control.

Fixes: c55978024d123 ("io_uring/net: move receive multishot out of the generic msghdr path")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/2a8418821fe83d3b64350ad2b3c0303e9b732bbd.1740498502.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/net.c

index 17852a6616ffef3cde6b1c24a5ca3f4bee070479..5d0b56ff50eed33443698a02b010f33b8aad9b6f 100644 (file)
@@ -322,7 +322,9 @@ static int io_sendmsg_copy_hdr(struct io_kiocb *req,
                if (unlikely(ret))
                        return ret;
 
-               return __get_compat_msghdr(&iomsg->msg, &cmsg, NULL);
+               ret = __get_compat_msghdr(&iomsg->msg, &cmsg, NULL);
+               sr->msg_control = iomsg->msg.msg_control_user;
+               return ret;
        }
 #endif