From: Jens Axboe <axboe@kernel.dk>
To: Cheng Yongkang <teel4res@gmail.com>
Cc: David Wei <davidhwei@meta.com>,
io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] io_uring/timeout: don't rearm a multishot timeout on cancel
Date: Mon, 16 Nov 2026 19:48:07 -0700 [thread overview]
Message-ID: <903b7861-a0f0-4b56-8e6e-3c7ec915c686@kernel.dk> (raw)
In-Reply-To: <20261117024643.478059-1-teel4res@gmail.com>
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
next prev parent reply other threads:[~2026-11-17 2:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 4:45 Cheng Yongkang
2026-11-17 2:41 ` Jens Axboe
2026-11-17 2:46 ` Cheng Yongkang
2026-11-17 2:48 ` Jens Axboe [this message]
2026-11-17 2:49 ` 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=903b7861-a0f0-4b56-8e6e-3c7ec915c686@kernel.dk \
--to=axboe@kernel.dk \
--cc=davidhwei@meta.com \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=teel4res@gmail.com \
/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
all inboxes | Powered by JetHome®