* [PATCH] io_uring/net: initialize mshot_len for send
@ 2026-07-26 22:27 Jens Axboe
2026-07-27 0:11 ` Gabriel Krisman Bertazi
0 siblings, 1 reply; 2+ messages in thread
From: Jens Axboe @ 2026-07-26 22:27 UTC (permalink / raw)
To: io-uring; +Cc: Sung Keum
Commit:
6a8afb9fff64 ("io_uring/net: allow multishot receive per-invocation cap")
changed how io_mshot_prep_retry() set sr->len, and added the same
initialization in io_mshot_prep_retry(). But it neglected to touch the
send path, which may also uses the mshot retry path. Ensure that
sr->mshot_len always gets initialized correctly.
Fixes: 6a8afb9fff64 ("io_uring/net: allow multishot receive per-invocation cap")
Cc: stable@vger.kernel.org
Reported-by: Sung Keum <kambodi127@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
diff --git a/io_uring/net.c b/io_uring/net.c
index 00a7df803b99..a74d15f7b7d2 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -445,6 +445,7 @@ int io_sendmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
req->flags |= REQ_F_NOWAIT;
if (req->flags & REQ_F_BUFFER_SELECT)
sr->buf_group = req->buf_index;
+ sr->mshot_total_len = sr->mshot_len = 0;
if (sr->flags & IORING_RECVSEND_BUNDLE) {
if (req->opcode == IORING_OP_SENDMSG)
return -EINVAL;
--
Jens Axboe
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] io_uring/net: initialize mshot_len for send
2026-07-26 22:27 [PATCH] io_uring/net: initialize mshot_len for send Jens Axboe
@ 2026-07-27 0:11 ` Gabriel Krisman Bertazi
0 siblings, 0 replies; 2+ messages in thread
From: Gabriel Krisman Bertazi @ 2026-07-27 0:11 UTC (permalink / raw)
To: Jens Axboe, io-uring; +Cc: Sung Keum
Jens Axboe <axboe@kernel.dk> writes:
> Commit:
>
> 6a8afb9fff64 ("io_uring/net: allow multishot receive per-invocation cap")
>
> changed how io_mshot_prep_retry() set sr->len, and added the same
> initialization in io_mshot_prep_retry(). But it neglected to touch the
> send path, which may also uses the mshot retry path. Ensure that
> sr->mshot_len always gets initialized correctly.
>
> Fixes: 6a8afb9fff64 ("io_uring/net: allow multishot receive per-invocation cap")
> Cc: stable@vger.kernel.org
> Reported-by: Sung Keum <kambodi127@gmail.com>
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
>
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
--
Gabriel Krisman Bertazi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-27 0:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-26 22:27 [PATCH] io_uring/net: initialize mshot_len for send Jens Axboe
2026-07-27 0:11 ` Gabriel Krisman Bertazi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox