From: Dylan Yudaken <[email protected]>
To: Jens Axboe <[email protected]>,
Pavel Begunkov <[email protected]>,
<[email protected]>
Cc: <[email protected]>, Dylan Yudaken <[email protected]>,
kernel test robot <[email protected]>
Subject: [PATCH] io_uring: fix io_recvmsg_prep_multishot casts
Date: Fri, 5 Aug 2022 04:54:50 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
Fix casts missing the __user parts. This seemed to only cause errors on
the alpha build, but it was definitely an oversight.
Reported-by: kernel test robot <[email protected]>
Fixes: 9bb66906f23e ("io_uring: support multishot in recvmsg")
Signed-off-by: Dylan Yudaken <[email protected]>
---
Hi,
I tried to reproduce this issue to be sure this fixes it, but I could not get the
warnings out of the gcc I have locally.
That being said it seems like a fairly clear fix.
io_uring/net.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/io_uring/net.c b/io_uring/net.c
index 32fc3da04e41..fa7a28b6bad5 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -575,12 +575,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;
}
base-commit: b2a88c212e652e94f1e4b635910972ac57ba4e97
--
2.30.2
next reply other threads:[~2022-08-05 11:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-05 11:54 Dylan Yudaken [this message]
2022-08-05 14:41 ` [PATCH] io_uring: fix io_recvmsg_prep_multishot casts Jens Axboe
2022-08-05 14:41 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox