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

Jens Axboe
2026-05-01T22:29:58Z

On 5/1/26 4:26 PM, Fedor Pchelkin wrote:
>> @@ -6188,7 +6184,7 @@ static int io_poll_update(struct io_kiocb *req, unsigned int issue_flags)
>> preq->result = ret2;
>>
>> }
>> - if (preq->result < 0)
>> + if (ret2 < 0)
>> req_set_fail(preq);
>> io_req_complete(preq, preq->result);
>> out:
>
> I'm really uncomfortable to raise this but - ret2 should be initialized in
> beginning of the function io_poll_update().

It's your second version... I'll send out a new set.

--
Jens Axboe