From: Jens Axboe <axboe@kernel.dk>
To: gregkh@linuxfoundation.org, lk@c--e.de, tip@tenbrinkmeijs.com
Cc: stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] io_uring/wait: fix min_timeout behavior" failed to apply to 6.12-stable tree
Date: Mon, 15 Jun 2026 08:41:01 -0600 [thread overview]
Message-ID: <9af1115f-6920-4531-a3a2-ed848540892b@kernel.dk> (raw)
In-Reply-To: <2026061511-underhand-neuron-492c@gregkh>
[-- Attachment #1: Type: text/plain, Size: 340 bytes --]
On 6/15/26 8:18 AM, gregkh@linuxfoundation.org wrote:
>
> The patch below does not apply to the 6.12-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
Here's one for 6.12-stable.
--
Jens Axboe
[-- Attachment #2: 0001-io_uring-wait-fix-min_timeout-behavior.patch --]
[-- Type: text/x-patch, Size: 1453 bytes --]
From e68b3e06b410a794322c65449e4357889a5e3e4f Mon Sep 17 00:00:00 2001
From: "Christian A. Ehrhardt" <lk@c--e.de>
Date: Sat, 6 Jun 2026 22:11:20 +0200
Subject: [PATCH 1/2] io_uring/wait: fix min_timeout behavior
Commit 29fe1bd01b99714f3136f922230a643c2742cda9 upstream.
The wakeup condition if a min timeout is present and has expired is that
at least _one_ CQE was posted. Thus set the cq_tail target to
->cq_min_tail + 1. Without this commit a spurious wakeup can result in a
premature wakeup because io_should_wake() will return true even if _no_
CQE was posted at all.
Cc: Tip ten Brink <tip@tenbrinkmeijs.com>
Fixes: e15cb2200b93 ("io_uring: fix min_wait wakeups for SQPOLL")
Cc: stable@vger.kernel.org
Signed-off-by: Christian A. Ehrhardt <lk@c--e.de>
Link: https://patch.msgid.link/20260606201120.1441447-1-lk@c--e.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
io_uring/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index e515aeafa878..03c6ab505d74 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -2414,7 +2414,7 @@ static enum hrtimer_restart io_cqring_min_timer_wakeup(struct hrtimer *timer)
}
/* any generated CQE posted past this time should wake us up */
- iowq->cq_tail = iowq->cq_min_tail;
+ iowq->cq_tail = iowq->cq_min_tail + 1;
iowq->t.function = io_cqring_timer_wakeup;
hrtimer_set_expires(timer, iowq->timeout);
--
2.53.0
prev parent reply other threads:[~2026-06-15 14:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 14:18 FAILED: patch "[PATCH] io_uring/wait: fix min_timeout behavior" failed to apply to 6.12-stable tree gregkh
2026-06-15 14:41 ` Jens Axboe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9af1115f-6920-4531-a3a2-ed848540892b@kernel.dk \
--to=axboe@kernel.dk \
--cc=gregkh@linuxfoundation.org \
--cc=lk@c--e.de \
--cc=stable@vger.kernel.org \
--cc=tip@tenbrinkmeijs.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.