mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Yichong Chen <chenyichong@uniontech.com>, io-uring@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Stefan Metzmacher <metze@samba.org>
Subject: Re: [PATCH] io_uring/net: keep recvmsg buffer select length within MAX_RW_COUNT
Date: Fri, 23 Oct 2026 09:29:34 -0600	[thread overview]
Message-ID: <6ef167c0-d9a2-44a5-a909-cace45ff4a51@kernel.dk> (raw)
In-Reply-To: <20261023112209.87979-1-chenyichong@uniontech.com>

On 10/23/26 5:22 AM, Yichong Chen wrote:
> io_recvmsg() takes the transfer length from the ring provided buffer when
> sqe->len is 0, and such a buffer can be up to 4G. min_ret is an int, so 2G
> or more makes it negative and the (ret < min_ret) block is skipped, and the
> oversized length reaches the socket layer unchanged: an empty socket then
> completes with 0 instead of arming poll, and a short read is reported as
> complete. Clamp the length to MAX_RW_COUNT, as io_recv() does.
> 
> Fixes: 78d0d2063bab ("io_uring/net: disable partial retries for recvmsg with cmsg")

Don't think that's correct, it just moved the check. Should be:

c7fb19428d67 ("io_uring: add support for ring mapped supplied buffers")

instead. I will fix that up. Waiting on Linus pulling the
previous bits, then I will queue this up for 7.4.

-- 
Jens Axboe


      reply	other threads:[~2026-10-23 15:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-23 11:22 Yichong Chen
2026-10-23 15:29 ` Jens Axboe [this message]

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 \
    --in-reply-to=6ef167c0-d9a2-44a5-a909-cace45ff4a51@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=chenyichong@uniontech.com \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=metze@samba.org \
    /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

all inboxes | Powered by JetHome®