Skip to content

Commit 4fe82ae

Browse files
isilenceaxboe
authored andcommitted
io_uring/net: restore msg_control on sendzc retry
cac9e44 ("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: [email protected] Fixes: 493108d ("io_uring/net: zerocopy sendmsg") Link: axboe/liburing#1067 Signed-off-by: Pavel Begunkov <[email protected]> Link: https://lore.kernel.org/r/cc1d5d9df0576fa66ddad4420d240a98a020b267.1712596179.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <[email protected]>
1 parent 978e5c1 commit 4fe82ae

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

io_uring/net.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,6 +1276,7 @@ int io_sendmsg_zc(struct io_kiocb *req, unsigned int issue_flags)
12761276

12771277
if (req_has_async_data(req)) {
12781278
kmsg = req->async_data;
1279+
kmsg->msg.msg_control_user = sr->msg_control;
12791280
} else {
12801281
ret = io_sendmsg_copy_hdr(req, &iomsg);
12811282
if (ret)

0 commit comments

Comments
 (0)