projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46a525e
)
io_uring/net: don't update msg_name if not provided
author
Pavel Begunkov
<asml.silence@gmail.com>
Thu, 29 Sep 2022 21:23:18 +0000
(22:23 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Thu, 29 Sep 2022 23:46:04 +0000
(17:46 -0600)
io_sendmsg_copy_hdr() may clear msg->msg_name if the userspace didn't
provide it, we should retain NULL in this case.
Cc: stable@vger.kernel.org
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/97d49f61b5ec76d0900df658cfde3aa59ff22121.1664486545.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/net.c
patch
|
blob
|
history
diff --git
a/io_uring/net.c
b/io_uring/net.c
index 9ada9da02d045f08c4cd8f557169b54860844dce..604eac5f7a348f702c82e53ca29daa05866a42f1 100644
(file)
--- a/
io_uring/net.c
+++ b/
io_uring/net.c
@@
-164,7
+164,8
@@
static int io_setup_async_msg(struct io_kiocb *req,
}
req->flags |= REQ_F_NEED_CLEANUP;
memcpy(async_msg, kmsg, sizeof(*kmsg));
- async_msg->msg.msg_name = &async_msg->addr;
+ if (async_msg->msg.msg_name)
+ async_msg->msg.msg_name = &async_msg->addr;
/* if were using fast_iov, set it to the new one */
if (!kmsg->free_iov) {
size_t fast_idx = kmsg->msg.msg_iter.iov - kmsg->fast_iov;