All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Pavel Begunkov <asml.silence@gmail.com>, io-uring@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: Re: [PATCH] io_uring: fix invalid handler for double apoll
Date: Sun, 25 Oct 2020 13:44:25 -0600	[thread overview]
Message-ID: <07ce7445-e4bf-b8f0-b666-51730ec1ef80@kernel.dk> (raw)
In-Reply-To: <923cecfe-6d0e-515f-3237-99884053b7f0@gmail.com>

On 10/25/20 1:32 PM, Pavel Begunkov wrote:
> On 25/10/2020 19:18, Jens Axboe wrote:
>> On 10/25/20 1:01 PM, Pavel Begunkov wrote:
>>> On 25/10/2020 18:42, Jens Axboe wrote:
>>>> On 10/25/20 10:24 AM, Pavel Begunkov wrote:
>>>>> On 25/10/2020 15:53, Jens Axboe wrote:
>>>>>> On 10/25/20 8:26 AM, Pavel Begunkov wrote:
>>>>>>> io_poll_double_wake() is called for both: poll requests and as apoll
>>>>>>> (internal poll to make rw and other requests), hence when it calls
>>>>>>> __io_async_wake() it should use a right callback depending on the
>>>>>>> current poll type.
>>>>>>
>>>>>> Can we do something like this instead? Untested...
>>>>>
>>>>> It should work, but looks less comprehensible. Though, it'll need
>>>>
>>>> Not sure I agree, with a comment it'd be nicer im ho:
>>>
>>> I don't really care enough to start a bikeshedding, let's get yours
>>> tested and merged.
>>
>> Not really bikeshedding I think, we're not debating names of
>> functions :-)
> 
> It's just not so important, and it even may get removed in a month,
> who knows.

Well it might not or it might take longer, still nice to have the
simplest fix...

>> My approach would need conditional clearing of ->private as well,
>> as far as I can tell. I'll give it a spin.
> 
> Maybe
> 
> - poll->wait.func(wait, mode, sync, key);
> + poll->wait.func(&poll->wait, mode, sync, key);

Ah yeah, that looks better.

-- 
Jens Axboe


  reply	other threads:[~2020-10-25 19:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-25 14:26 [PATCH] io_uring: fix invalid handler for double apoll Pavel Begunkov
2020-10-25 15:53 ` Jens Axboe
2020-10-25 16:24   ` Pavel Begunkov
2020-10-25 18:42     ` Jens Axboe
2020-10-25 19:01       ` Pavel Begunkov
2020-10-25 19:18         ` Jens Axboe
2020-10-25 19:32           ` Pavel Begunkov
2020-10-25 19:44             ` Jens Axboe [this message]
2020-10-25 19:54               ` Pavel Begunkov
2020-10-26  1:22                 ` Jens Axboe

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=07ce7445-e4bf-b8f0-b666-51730ec1ef80@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=asml.silence@gmail.com \
    --cc=io-uring@vger.kernel.org \
    --cc=stable@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.