Re: [PATCH] io_uring/timeout: don't rearm a multishot timeout on cancel
From: Jens Axboe
Date: Mon Nov 16 2026 - 21:48:14 EST
On 11/16/26 7:46 PM, Cheng Yongkang wrote:
> On 11/16/26 7:41 PM, Jens Axboe wrote:
>> But why would the app do that, to shoot itself in the foot?
>>
>> I think the fix is fine, but the premise of it is very odd.
>
> Agreed, no sane app would do that. The only thing that made it look
> worth fixing to me is where the cost lands. The drain runs from
> io_ring_exit_work() after the task has closed the ring, so the time is
> spent in a kworker holding uring_lock, and the app can no longer stop
> it by being killed.
>
> Without the bogus CQ head the timeout is still rearmed during cancel,
> it just stops once the CQ is full, so the change mostly makes the
> timeout handler skip the rearm like the other cancel paths do.
>
> I can reword the commit message to lead with that instead, if you
> prefer.
No it's fine, I already queued it up. But it really reeks of odd
and bogus syzbot test case, it's most certainly not something
that any normal application would see.
--
Jens Axboe