Skip to content

Commit 26fed83

Browse files
committed
io_uring/net: use the correct msghdr union member in io_sendmsg_copy_hdr
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 <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Fixes: cac9e44 ("io_uring/net: save msghdr->msg_control for retries") Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 78d0d20 commit 26fed83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

io_uring/net.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ static int io_sendmsg_copy_hdr(struct io_kiocb *req,
203203
ret = sendmsg_copy_msghdr(&iomsg->msg, sr->umsg, sr->msg_flags,
204204
&iomsg->free_iov);
205205
/* save msg_control as sys_sendmsg() overwrites it */
206-
sr->msg_control = iomsg->msg.msg_control;
206+
sr->msg_control = iomsg->msg.msg_control_user;
207207
return ret;
208208
}
209209

@@ -302,7 +302,7 @@ int io_sendmsg(struct io_kiocb *req, unsigned int issue_flags)
302302

303303
if (req_has_async_data(req)) {
304304
kmsg = req->async_data;
305-
kmsg->msg.msg_control = sr->msg_control;
305+
kmsg->msg.msg_control_user = sr->msg_control;
306306
} else {
307307
ret = io_sendmsg_copy_hdr(req, &iomsg);
308308
if (ret)

0 commit comments

Comments
 (0)