Skip to contentSkip to conversation

Patch "io_uring: fail links of cancelled timeouts" has been added to the 5.13-stable tree

DISCUSSION Greg KH 1 participant 1 message Sep 13, 2021 1 message not in the archive

lore
Share & tools
lore

Greg KH

author
#1 lore raw
In reply to a message not in the archive
Quoted 51 lines · On Mon, Sep 13, 2021 at 11:45:14AM +0200, [email protected] wrote:

This is a note to let you know that I've just added the patch titled

io_uring: fail links of cancelled timeouts

to the 5.13-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
io_uring-fail-links-of-cancelled-timeouts.patch
and it can be found in the queue-5.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 2ae2eb9dde18979b40629dd413b9adbd6c894cdf Mon Sep 17 00:00:00 2001

From: Pavel Begunkov <[email protected]>
Date: Thu, 9 Sep 2021 13:56:27 +0100
Subject: io_uring: fail links of cancelled timeouts

From: Pavel Begunkov <[email protected]>

commit 2ae2eb9dde18979b40629dd413b9adbd6c894cdf upstream.

When we cancel a timeout we should mark it with REQ_F_FAIL, so linked requests are cancelled as well, but not queued for further execution.

---
 fs/io_uring.c |    2 ++
 1 file changed, 2 insertions(+)
fs/io_uring.c +2 -0
@@ -1307,6 +1307,8 @@ static void io_kill_timeout(struct io_ki
 	struct io_timeout_data *io = req->async_data;
 
 	if (hrtimer_try_to_cancel(&io->timer) != -1) {
+		if (status)
+			req_set_fail(req);
 		atomic_set(&req->ctx->cq_timeouts,
 			atomic_read(&req->ctx->cq_timeouts) + 1);
 		list_del_init(&req->timeout.list);
Quoted 7 lines

Patches currently in stable-queue which might be from [email protected] are

queue-5.13/io_uring-limit-fixed-table-size-by-rlimit_nofile.patch queue-5.13/io_uring-reexpand-under-reexpanded-iters.patch queue-5.13/io_uring-fail-links-of-cancelled-timeouts.patch queue-5.13/bio-fix-page-leak-bio_add_hw_page-failure.patch queue-5.13/io_uring-refactor-io_submit_flush_completions.patch

Breaks the build on 5.13.y so dropping it from there.

thanks,

greg k-h