[lvc-project] [PATCH 5.10 491/491] io_uring/poll: correctly handle io_poll_add() return value on update

Jens Axboe axboe at kernel.dk
Sat May 2 00:42:05 MSK 2026


On 5/1/26 3:39 PM, Sasha Levin wrote:
> On Fri, May 01, 2026 at 03:23:33PM -0600, Jens Axboe wrote:
>> On 5/1/26 3:11 PM, Sasha Levin wrote:
>>> On Fri, 01 May 2026 11:54:18 +0300, Fedor Pchelkin wrote:
>>>> The Fixes: tag of upstream 84230ad2d2afb points to 97b388d70b53
>>>> ("io_uring: handle completions in the core", v5.19), which is NOT
>>>> present in 5.10 or 5.15. Additionally, in 5.10/5.15 'preq->result'
>>>> is unsigned so the 'if (preq->result < 0)' check is a no-op, and
>>>> __io_poll_add() already completes the request when it returns
>>>> non-zero, leading to a potential double-completion.
>>>>
>>>> I would suggest to revert the patch from these trees because there
>>>> appears to be no real bug to fix.
>>>
>>> Agreed. I've reverted both the original backport and the followup
>>> "fix backport" commit on 5.10 and 5.15.
>>
>> Please hold off, I have fully tested these. It's quite possible they are
>> wonky in certain ways, but they currently fix a livelock as well that
>> you can hit on 5.10/15 which is arguably worse. Double claim + complete
>> should be handled by the poll grab side, I'm _assuming_ more cosmetic
>> than anything else.
>>
>> Please refrain from dropping patches until they have been confirmed by
>> someone that actually knows the code. I've been busy today and haven't
>> had time to look into this one just yet. You're just making more work
>> for me by dropping this you have little insight into.
> 
> I haven't realized that this was a custom backport - I thought that they were
> pulled in without the Fixes commit being present.
> 
> I'll drop the revert, luckily this wasn't pushed to stable-queue yet.

Please just add the fixup, which should go into 5.15-stable as well
of course. Both of those have been notified about previously.

-- 
Jens Axboe




More information about the lvc-project mailing list