summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2024-04-08 18:11:09 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-17 11:19:33 +0200
commit96b7b0934a343c80425bb01705a1f9ea0f029961 (patch)
tree000d2e2b95fa636e7baec6cb7d2767cfd0c6d198 /io_uring
parent585c5732caaa221e4874a23b49f88e6c6e499fdb (diff)
downloadlinux-rpi-96b7b0934a343c80425bb01705a1f9ea0f029961.tar.gz
linux-rpi-96b7b0934a343c80425bb01705a1f9ea0f029961.tar.bz2
linux-rpi-96b7b0934a343c80425bb01705a1f9ea0f029961.zip
io_uring/net: restore msg_control on sendzc retry
commit 4fe82aedeb8a8cb09bfa60f55ab57b5c10a74ac4 upstream. cac9e4418f4cb ("io_uring/net: save msghdr->msg_control for retries") reinstatiates msg_control before every __sys_sendmsg_sock(), since the function can overwrite the value in msghdr. We need to do same for zerocopy sendmsg. Cc: stable@vger.kernel.org Fixes: 493108d95f146 ("io_uring/net: zerocopy sendmsg") Link: https://github.com/axboe/liburing/issues/1067 Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/cc1d5d9df0576fa66ddad4420d240a98a020b267.1712596179.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/net.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/io_uring/net.c b/io_uring/net.c
index 5a4001139e28..cf1060fb04f4 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -1274,6 +1274,7 @@ int io_sendmsg_zc(struct io_kiocb *req, unsigned int issue_flags)
if (req_has_async_data(req)) {
kmsg = req->async_data;
+ kmsg->msg.msg_control_user = sr->msg_control;
} else {
ret = io_sendmsg_copy_hdr(req, &iomsg);
if (ret)