Commit 3d879647 authored by Jens Axboe's avatar Jens Axboe
Browse files

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: 49ae66eb ("io_uring: defer linked-timeout chain splice out of hrtimer context")
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent cf18e364
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -417,9 +417,11 @@ static enum hrtimer_restart io_link_timeout_fn(struct hrtimer *timer)
	 * done in io_req_task_link_timeout(), if needed.
	 */
	if (prev) {
		if (!req_ref_inc_not_zero(prev))
		if (!req_ref_inc_not_zero(prev)) {
			io_remove_next_linked(prev);
			prev = NULL;
		}
	}
	list_del(&timeout->list);
	timeout->prev = prev;
	raw_spin_unlock_irqrestore(&ctx->timeout_lock, flags);