From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Helen Koike <koike@igalia.com>,
syzbot+b8ca586b9fc235f0c0df@syzkaller.appspotmail.com,
Thomas Gleixner <tglx@kernel.org>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.15.y] debugobjects: Do not fill_pool() if pi_blocked_on
Date: Thu, 18 Jun 2026 12:35:15 -0400 [thread overview]
Message-ID: <20260618163515.797362-1-sashal@kernel.org> (raw)
In-Reply-To: <2026061612-blizzard-paced-855b@gregkh>
From: Helen Koike <koike@igalia.com>
[ Upstream commit 5f41161059fd0f1bbf18c90f3180e38cc45a14eb ]
On RT enabled kernels, fill_pool() ends up calling rtlock_lock(), which
asserts if current::pi_blocked_on is set, because a task can obviously only
block on one lock as otherwise the priority inheritenace chain gets
corrupted.
Prevent this by expanding the conditional to take current::pi_blocked_on
into account.
Fixes: 4bedcc28469a ("debugobjects: Make them PREEMPT_RT aware")
Reported-by: syzbot+b8ca586b9fc235f0c0df@syzkaller.appspotmail.com
Signed-off-by: Helen Koike <koike@igalia.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260511215359.3351259-1-koike@igalia.com
Closes: https://syzkaller.appspot.com/bug?extid=b8ca586b9fc235f0c0df
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
lib/debugobjects.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index 0b0449ee21aa97..06bef7d6b67010 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -609,9 +609,14 @@ __debug_object_init(void *addr, const struct debug_obj_descr *descr, int onstack
/*
* On RT enabled kernels the pool refill must happen in preemptible
- * context:
+ * context and not enqueued on an rt_mutex:
*/
+#ifdef CONFIG_RT_MUTEXES
+ if (!IS_ENABLED(CONFIG_PREEMPT_RT) ||
+ (preemptible() && current->pi_blocked_on == NULL))
+#else
if (!IS_ENABLED(CONFIG_PREEMPT_RT) || preemptible())
+#endif
fill_pool();
db = get_bucket((unsigned long) addr);
--
2.53.0
prev parent reply other threads:[~2026-06-18 16:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 9:50 FAILED: patch "[PATCH] debugobjects: Do not fill_pool() if pi_blocked_on" failed to apply to 5.15-stable tree gregkh
2026-06-18 16:35 ` Sasha Levin [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=20260618163515.797362-1-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=koike@igalia.com \
--cc=stable@vger.kernel.org \
--cc=syzbot+b8ca586b9fc235f0c0df@syzkaller.appspotmail.com \
--cc=tglx@kernel.org \
/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.