diff options
author | Dylan Yudaken <dylany@fb.com> | 2022-08-05 04:54:50 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-08-05 08:41:18 -0600 |
commit | d1f6222c4978817712e0f2825ce9e830763f0695 (patch) | |
tree | d4db983c3eff7f50a9afaba5c799581d3083d3a0 /io_uring | |
parent | 4a933e62083ead6cd064293a7505c56165859320 (diff) |
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 <lkp@intel.com>
Fixes: 9bb66906f23e ("io_uring: support multishot in recvmsg")
Signed-off-by: Dylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/20220805115450.3921352-1-dylany@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
-rw-r--r-- | io_uring/net.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/io_uring/net.c b/io_uring/net.c index f9f080b3cc1e..e6fc9748fbd2 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -576,12 +576,12 @@ static int io_recvmsg_prep_multishot(struct io_async_msghdr *kmsg, if (kmsg->controllen) { unsigned long control = ubuf + hdr - kmsg->controllen; - kmsg->msg.msg_control_user = (void *) control; + kmsg->msg.msg_control_user = (void __user *) control; kmsg->msg.msg_controllen = kmsg->controllen; } sr->buf = *buf; /* stash for later copy */ - *buf = (void *) (ubuf + hdr); + *buf = (void __user *) (ubuf + hdr); kmsg->payloadlen = *len = *len - hdr; return 0; } |