From nobody Mon May 25 05:54:38 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3049F3E315A; Mon, 18 May 2026 08:59:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779094754; cv=none; b=nONvDFzy0k5TEUhrOIMzpgRE5buLkC0e2a4cBSBJKgUEzdYcJHDc5jG0wAqD7EdpYtCpMReUQ0RBSWPICIPlWrYmO54bb4FRVc18MJGWvfxsWe6jyob3XWYZicYT1Fyx+2ZHqdh78INZ3Vo1QfOQBg05ML1hZRCoOmUfL52/c68= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779094754; c=relaxed/simple; bh=1GmfjMcfBZP5tP54iF2J58ojuEvyW5REwAuivaHPf/0=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=bb5iGw2npn7G7aNEef3iiCn//f0+x2grjO56QZ/Ii79CVGCLEiqCMRWtOLhCe7hEzb0IyN1UnDBcGNzPCizJz866EvLE/v3zna7YM8p+2f0a2rtiz3H+pBLDmoWTrtkwesVNRigE/IE/A+day3vAPnmkWYQ8MNsisICHsE7JG8c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=igiPCOrG; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=4QQSppsX; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="igiPCOrG"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="4QQSppsX" Date: Mon, 18 May 2026 08:59:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1779094749; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/NTw52khCHJ1ayHiof1WHzfAN20hiQ4J+agNTJPTaOs=; b=igiPCOrGnOg++PofnljLF2XYHLe9hwI03HT+GASRV32NvVqwHrVwjt0aF1DHr196dYjh/t qOk+yN320O+3zwtLHmKsrT5hh1hHnGaUSzgN1DvHP4o6wH6aFD9C48rgCcfm2TU0yNUvLz zxs2gvBnYqS44L3WnR4m0Q/oev2oBGEEyPPJCjRmMh5RnpwRW7Xxau7odd0VmQVaAx+ZgD uaWUyHc6sqbzCnk1JTKuzdgUBq1GM1zEbRvj8jTXxF2/ilXfm9fyvvosYhtmQyMDx/FDk0 cJTOLSrLcr0Ec/TJWFqZK964hjcv+4L1uthgtn4FTCYbK8ImhhQVsoblO2S/CQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1779094749; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/NTw52khCHJ1ayHiof1WHzfAN20hiQ4J+agNTJPTaOs=; b=4QQSppsXBRiqt4e0KVhUmJkvD7F7+4imcrq9M2pNa5qtO3TstKfzobJtFw+gG22ZAhc2mA op2Ct5HOMl+NPHDg== From: "tip-bot2 for Helen Koike" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: core/urgent] debugobjects: Do not fill_pool() if pi_blocked_on Cc: syzbot+b8ca586b9fc235f0c0df@syzkaller.appspotmail.com, Helen Koike , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260511215359.3351259-1-koike@igalia.com> References: <20260511215359.3351259-1-koike@igalia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177909474302.711.8634830846416755165.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the core/urgent branch of tip: Commit-ID: 5f41161059fd0f1bbf18c90f3180e38cc45a14eb Gitweb: https://git.kernel.org/tip/5f41161059fd0f1bbf18c90f3180e38cc= 45a14eb Author: Helen Koike AuthorDate: Mon, 11 May 2026 18:53:05 -03:00 Committer: Thomas Gleixner CommitterDate: Mon, 18 May 2026 10:56:36 +02:00 debugobjects: Do not fill_pool() if pi_blocked_on 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 Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/20260511215359.3351259-1-koike@igalia.com Closes: https://syzkaller.appspot.com/bug?extid=3Db8ca586b9fc235f0c0df --- lib/debugobjects.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 12e2e42..772ddab 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c @@ -711,6 +711,15 @@ static struct debug_obj *lookup_object_or_alloc(void *= addr, struct debug_bucket=20 return NULL; } =20 +static inline bool debug_objects_is_pi_blocked_on(void) +{ +#ifdef CONFIG_RT_MUTEXES + return current->pi_blocked_on !=3D NULL; +#else + return false; +#endif +} + static void debug_objects_fill_pool(void) { if (!static_branch_likely(&obj_cache_enabled)) @@ -727,11 +736,12 @@ static void debug_objects_fill_pool(void) =20 /* * On RT enabled kernels the pool refill must happen in preemptible - * context -- for !RT kernels we rely on the fact that spinlock_t and - * raw_spinlock_t are basically the same type and this lock-type - * inversion works just fine. + * context and not enqueued on an rt_mutex -- for !RT kernels we rely + * on the fact that spinlock_t and raw_spinlock_t are basically the + * same type and this lock-type inversion works just fine. */ - if (!IS_ENABLED(CONFIG_PREEMPT_RT) || preemptible() || system_state < SYS= TEM_SCHEDULING) { + if (!IS_ENABLED(CONFIG_PREEMPT_RT) || system_state < SYSTEM_SCHEDULING || + (preemptible() && !debug_objects_is_pi_blocked_on())) { /* * Annotate away the spinlock_t inside raw_spinlock_t warning * by temporarily raising the wait-type to LD_WAIT_CONFIG, matching