public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, io-uring@vger.kernel.org
Subject: Re: [PATCH 1/1] io_uring/poll: fix POLLERR handling
Date: Wed, 16 Jul 2025 17:18:19 +0100	[thread overview]
Message-ID: <2926a9d7-3484-4004-a40b-9a739bdaea13@gmail.com> (raw)
In-Reply-To: <cb896d1f-6260-4ba6-b6f6-6b4693f5e6b3@kernel.dk>

On 7/15/25 20:12, Jens Axboe wrote:
...>>> How is it related to POLLIN?
>>
>> Gah POLLOUT of course.
>>
>>>> should let it go through. And there should not be a need to call
>>>> vfs_poll() unless ->in_progress is already set. Something ala:
>>>
>>> In any case, v1 doesn't seem to work, so needs to be done differently.
>>
>> RIght, that's what I aluded to in the "improved/fixed" further. FWIW, I
>> did dig out the old test case I wrote for this and added it to liburing
>> as well. So should have somewhat better coverage now.
> 
> How about:
> 
> if (connect->in_progress) {
> 	struct poll_table_struct pt = { ._key = EPOLLERR };
> 
> 	if (vfs_poll(req->file, &pt) & EPOLLERR)
> 		goto get_sock_err;
> }
>   
> with get_sock_err being where we do sock_error()?

Seems to work. sock_error() can also race, but I don't want to
waste any more time on it.

-- 
Pavel Begunkov


      reply	other threads:[~2025-07-16 16:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-14 10:59 [PATCH 1/1] io_uring/poll: fix POLLERR handling Pavel Begunkov
2025-07-14 14:56 ` Jens Axboe
2025-07-14 15:30   ` Pavel Begunkov
2025-07-14 17:51     ` Jens Axboe
2025-07-14 20:45       ` Jens Axboe
2025-07-15  9:06         ` Pavel Begunkov
2025-07-15 18:13           ` Jens Axboe
2025-07-15 19:12             ` Jens Axboe
2025-07-16 16:18               ` Pavel Begunkov [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=2926a9d7-3484-4004-a40b-9a739bdaea13@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --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