]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring: always arm linked timeouts prior to issue
authorJens Axboe <axboe@kernel.dk>
Mon, 5 May 2025 14:34:39 +0000 (08:34 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 May 2025 06:21:25 +0000 (08:21 +0200)
commit95b9acb0bb4ef616f4a8cfdfd416547cdd95d58d
treeb02f4b4e4d4ef32338686d898bc61cc96c874f8c
parent0e42a14899ca8982d20599965c7b5704be27f67f
io_uring: always arm linked timeouts prior to issue

Commit b53e523261bf058ea4a518b482222e7a277b186b upstream.

There are a few spots where linked timeouts are armed, and not all of
them adhere to the pre-arm, attempt issue, post-arm pattern. This can
be problematic if the linked request returns that it will trigger a
callback later, and does so before the linked timeout is fully armed.

Consolidate all the linked timeout handling into __io_issue_sqe(),
rather than have it spread throughout the various issue entry points.

Cc: stable@vger.kernel.org
Link: https://github.com/axboe/liburing/issues/1390
Reported-by: Chase Hiltz <chase@path.net>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/io_uring.c