summaryrefslogtreecommitdiff
path: root/kernel/debug/debug_core.c
diff options
context:
space:
mode:
authorCheng Yongkang <teel4res@gmail.com>2026-11-15 20:45:19 -0800
committerJens Axboe <axboe@kernel.dk>2026-11-16 19:48:32 -0700
commit97d4a585db2b91d855f957be0a9f126068c5be93 (patch)
tree7c3edbf07a825a9c062e2b156b591539921c4f74 /kernel/debug/debug_core.c
parentd4912d6440bf6d255e1fa1c360c8ddb39d0e01bd (diff)
io_uring/timeout: don't rearm a multishot timeout on cancel
io_timeout_complete() does not check tw.cancel. When it runs from io_cancel_local_task_work(), a multishot timeout that has not reached its count still posts an IORING_CQE_F_MORE completion and rearms its timer. With a zero interval the timer expires again right away and queues new task work, so the drain keeps running it until posting a CQE fails. Normally the CQ fills up quickly and the request then completes. But if userspace moves the CQ head far ahead of the tail, for example to cq.tail + 0x7fffffff, posting keeps succeeding and ring teardown is delayed for a long time. Don't post another CQE or rearm the timer when tw.cancel is set, so the request completes through io_req_task_complete(), like the poll and linked timeout task work does when cancelled. Fixes: ea97f6c8558e ("io_uring: add support for multishot timeouts") Signed-off-by: Cheng Yongkang <teel4res@gmail.com> Link: https://patch.msgid.link/20261116044519.281756-1-teel4res@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'kernel/debug/debug_core.c')
0 files changed, 0 insertions, 0 deletions