* [PATCH 5.8] io_uring: fix missing msg_name assignment
@ 2020-07-12 7:05 Pavel Begunkov
2020-07-12 10:23 ` [PATCH v2] " Pavel Begunkov
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Begunkov @ 2020-07-12 7:05 UTC (permalink / raw)
To: Jens Axboe, io-uring; +Cc: stable
Ensure to set msg.msg_name for the async portion of send/recvmsg,
as the header copy will copy to/from it.
Cc: [email protected] # 5.5, 5.6, 5.7
Signed-off-by: Pavel Begunkov <[email protected]>
---
fs/io_uring.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 7f2a2cb5c056..8482b9aed952 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -3913,6 +3913,7 @@ static int io_sendmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
if (req->flags & REQ_F_NEED_CLEANUP)
return 0;
+ io->msg.msg.msg_name = &io->msg.addr;
io->msg.iov = io->msg.fast_iov;
ret = sendmsg_copy_msghdr(&io->msg.msg, sr->msg, sr->msg_flags,
&io->msg.iov);
@@ -4025,6 +4026,7 @@ static int __io_recvmsg_copy_hdr(struct io_kiocb *req, struct io_async_ctx *io)
size_t iov_len;
int ret;
+ io->msg.msg.msg_name = &io->msg.addr;
ret = __copy_msghdr_from_user(&io->msg.msg, sr->msg, &io->msg.uaddr,
&uiov, &iov_len);
if (ret)
--
2.24.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2] io_uring: fix missing msg_name assignment
2020-07-12 7:05 [PATCH 5.8] io_uring: fix missing msg_name assignment Pavel Begunkov
@ 2020-07-12 10:23 ` Pavel Begunkov
2020-07-12 15:40 ` Jens Axboe
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Begunkov @ 2020-07-12 10:23 UTC (permalink / raw)
To: Jens Axboe, io-uring; +Cc: stable
Ensure to set msg.msg_name for the async portion of send/recvmsg,
as the header copy will copy to/from it.
Cc: [email protected] # 5.5, 5.6, 5.7
Signed-off-by: Pavel Begunkov <[email protected]>
---
v2: don't miss out compat for recv
fs/io_uring.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 7f2a2cb5c056..0ecd70dbf0fd 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -3913,6 +3913,7 @@ static int io_sendmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
if (req->flags & REQ_F_NEED_CLEANUP)
return 0;
+ io->msg.msg.msg_name = &io->msg.addr;
io->msg.iov = io->msg.fast_iov;
ret = sendmsg_copy_msghdr(&io->msg.msg, sr->msg, sr->msg_flags,
&io->msg.iov);
@@ -4094,6 +4095,7 @@ static int __io_compat_recvmsg_copy_hdr(struct io_kiocb *req,
static int io_recvmsg_copy_hdr(struct io_kiocb *req, struct io_async_ctx *io)
{
+ io->msg.msg.msg_name = &io->msg.addr;
io->msg.iov = io->msg.fast_iov;
#ifdef CONFIG_COMPAT
--
2.24.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-12 15:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-12 7:05 [PATCH 5.8] io_uring: fix missing msg_name assignment Pavel Begunkov
2020-07-12 10:23 ` [PATCH v2] " Pavel Begunkov
2020-07-12 15:40 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox