Commit 4fe82aed authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe

io_uring/net: restore msg_control on sendzc retry

cac9e441 ("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: 493108d9 ("io_uring/net: zerocopy sendmsg")
Link: https://github.com/axboe/liburing/issues/1067Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/cc1d5d9df0576fa66ddad4420d240a98a020b267.1712596179.git.asml.silence@gmail.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 978e5c19
...@@ -1276,6 +1276,7 @@ int io_sendmsg_zc(struct io_kiocb *req, unsigned int issue_flags) ...@@ -1276,6 +1276,7 @@ int io_sendmsg_zc(struct io_kiocb *req, unsigned int issue_flags)
if (req_has_async_data(req)) { if (req_has_async_data(req)) {
kmsg = req->async_data; kmsg = req->async_data;
kmsg->msg.msg_control_user = sr->msg_control;
} else { } else {
ret = io_sendmsg_copy_hdr(req, &iomsg); ret = io_sendmsg_copy_hdr(req, &iomsg);
if (ret) if (ret)
......
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