]> 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:24:10 +0000 (08:24 +0200)
commit51f1389b5fe1a1eb3c50d1806f8dcaaa34bdc466
tree7c07cc34ace6fc31074549780a82300f814f40c6
parent00f0dd1a0166e1ed8adeb50a6e345b4fd7878431
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