From: Jens Axboe <axboe@kernel.dk>
To: Pavel Begunkov <asml.silence@gmail.com>,
io-uring <io-uring@vger.kernel.org>
Cc: Francis Brosseau <francis@malagauche.com>
Subject: Re: [PATCH v3] io_uring/poll: fix multishot recv missing EOF on wakeup race
Date: Tue, 17 Mar 2026 12:42:51 -0600 [thread overview]
Message-ID: <39373749-0c58-43df-89d8-b74adfdaea63@kernel.dk> (raw)
In-Reply-To: <1e05f8c5-0faa-491a-b62a-33fcf84b96c9@gmail.com>
On 3/17/26 12:37 PM, Pavel Begunkov wrote:
> On 3/17/26 13:07, Jens Axboe wrote:
> ...
>> Right, as per my earlier emails, this is what introduced the issue for
>> AF_UNIX, when the INQ support was added. We read the whole thing, and
>> INQ is correctly returned as having 0 bytes left. Hence no retry
>> happens, and the EOF is missed. We could do something ala the below,
>> entirely untested, which would ensure we retry for that condition.
>
> static int tcp_inq_hint(struct sock *sk)
> {
> ...
> if (inq == 0 && sock_flag(sk, SOCK_DONE))
> inq = 1;
> return inq;
> }
>
> Assuming TCP doesn't work either, I guess I was curious whether it
> gets shutdown but the sock is !SOCK_DONE, or whether inq=1 is correct.
> Just thinking out loud, maybe I will check later.
Ah indeed, yes that's a good find. Let me test that real quick...
I feel like the AF_UNIX inq addition was somewhat half baked.
--
Jens Axboe
prev parent reply other threads:[~2026-03-17 18:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 2:17 [PATCH v3] io_uring/poll: fix multishot recv missing EOF on wakeup race Jens Axboe
2026-03-17 12:27 ` Pavel Begunkov
2026-03-17 13:07 ` Jens Axboe
2026-03-17 18:37 ` Pavel Begunkov
2026-03-17 18:42 ` 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=39373749-0c58-43df-89d8-b74adfdaea63@kernel.dk \
--to=axboe@kernel.dk \
--cc=asml.silence@gmail.com \
--cc=francis@malagauche.com \
--cc=io-uring@vger.kernel.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