Skip to content

Commit d1f6222

Browse files
Dylan Yudakenaxboe
authored andcommitted
io_uring: fix io_recvmsg_prep_multishot sparse warnings
Fix casts missing the __user parts. This seemed to only cause errors on the alpha build, or if checked with sparse, but it was definitely an oversight. Reported-by: kernel test robot <[email protected]> Fixes: 9bb6690 ("io_uring: support multishot in recvmsg") Signed-off-by: Dylan Yudaken <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 4a933e6 commit d1f6222

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
@@ -576,12 +576,12 @@ static int io_recvmsg_prep_multishot(struct io_async_msghdr *kmsg,
576576
if (kmsg->controllen) {
577577
unsigned long control = ubuf + hdr - kmsg->controllen;
578578

579-
kmsg->msg.msg_control_user = (void *) control;
579+
kmsg->msg.msg_control_user = (void __user *) control;
580580
kmsg->msg.msg_controllen = kmsg->controllen;
581581
}
582582

583583
sr->buf = *buf; /* stash for later copy */
584-
*buf = (void *) (ubuf + hdr);
584+
*buf = (void __user *) (ubuf + hdr);
585585
kmsg->payloadlen = *len = *len - hdr;
586586
return 0;
587587
}

0 commit comments

Comments
 (0)