Patch "io_uring/net: use the correct msghdr union member in io_sendmsg_copy_hdr" has been added to the 6.3-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    io_uring/net: use the correct msghdr union member in io_sendmsg_copy_hdr

to the 6.3-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     io_uring-net-use-the-correct-msghdr-union-member-in-.patch
and it can be found in the queue-6.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 97fa88debe02e86b51586bc5afb15ed61a2f463e
Author: Jens Axboe <axboe@xxxxxxxxx>
Date:   Tue Jun 20 16:11:51 2023 -0600

    io_uring/net: use the correct msghdr union member in io_sendmsg_copy_hdr
    
    [ Upstream commit 26fed83653d0154704cadb7afc418f315c7ac1f0 ]
    
    Rather than assign the user pointer to msghdr->msg_control, assign it
    to msghdr->msg_control_user to make sparse happy. They are in a union
    so the end result is the same, but let's avoid new sparse warnings and
    squash this one.
    
    Reported-by: kernel test robot <lkp@xxxxxxxxx>
    Closes: https://lore.kernel.org/oe-kbuild-all/202306210654.mDMcyMuB-lkp@xxxxxxxxx/
    Fixes: cac9e4418f4c ("io_uring/net: save msghdr->msg_control for retries")
    Reviewed-by: Christoph Hellwig <hch@xxxxxx>
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/io_uring/net.c b/io_uring/net.c
index 49dc43d1d9fd5..2cf671cef0b61 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -203,7 +203,7 @@ static int io_sendmsg_copy_hdr(struct io_kiocb *req,
 	ret = sendmsg_copy_msghdr(&iomsg->msg, sr->umsg, sr->msg_flags,
 					&iomsg->free_iov);
 	/* save msg_control as sys_sendmsg() overwrites it */
-	sr->msg_control = iomsg->msg.msg_control;
+	sr->msg_control = iomsg->msg.msg_control_user;
 	return ret;
 }
 
@@ -302,7 +302,7 @@ int io_sendmsg(struct io_kiocb *req, unsigned int issue_flags)
 
 	if (req_has_async_data(req)) {
 		kmsg = req->async_data;
-		kmsg->msg.msg_control = sr->msg_control;
+		kmsg->msg.msg_control_user = sr->msg_control;
 	} else {
 		ret = io_sendmsg_copy_hdr(req, &iomsg);
 		if (ret)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux