Skip to content

Commit 3d87964

Browse files
committed
io_uring/timeout: splice timed out link in timeout handler
A previous commit deferred this to the task_work part of it, so it could be protected by ->uring_lock. But that's actually not necessary here, and in fact the head clearing is not enough to make that safe. For those two reasons, just re-instate the local splicing. Fixes: 49ae66e ("io_uring: defer linked-timeout chain splice out of hrtimer context") Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent cf18e36 commit 3d87964

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

io_uring/timeout.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,10 @@ static enum hrtimer_restart io_link_timeout_fn(struct hrtimer *timer)
417417
* done in io_req_task_link_timeout(), if needed.
418418
*/
419419
if (prev) {
420-
if (!req_ref_inc_not_zero(prev))
420+
if (!req_ref_inc_not_zero(prev)) {
421+
io_remove_next_linked(prev);
421422
prev = NULL;
423+
}
422424
}
423425
list_del(&timeout->list);
424426
timeout->prev = prev;

0 commit comments

Comments
 (0)