summaryrefslogtreecommitdiff
path: root/io_uring/timeout.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2026-05-20 10:02:58 -0600
committerJens Axboe <axboe@kernel.dk>2026-05-20 10:02:58 -0600
commit3d879647fb03dab6fe6e1dd9404a2dd324096218 (patch)
tree0610db1be985188770de3a8c8780d60ca26d9bb9 /io_uring/timeout.c
parentcf18e36455603d65d4745de83e2d1743c54ada47 (diff)
downloadlinux-next-3d879647fb03dab6fe6e1dd9404a2dd324096218.tar.gz
linux-next-3d879647fb03dab6fe6e1dd9404a2dd324096218.zip
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: 49ae66eb8c27 ("io_uring: defer linked-timeout chain splice out of hrtimer context") Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/timeout.c')
-rw-r--r--io_uring/timeout.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/io_uring/timeout.c b/io_uring/timeout.c
index 6353a4d979dc..c4dd26cf342d 100644
--- a/io_uring/timeout.c
+++ b/io_uring/timeout.c
@@ -417,8 +417,10 @@ 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;