From nobody Sat Feb 7 08:53:58 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 785A1334C06; Mon, 5 Jan 2026 15:54:16 +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=1767628458; cv=none; b=g1gQ1dbbxXMOR8NYd7ljJL3cXPDgy/Hu0DgGh9uoR1F4u50negSadWz7WJ1PTL46V54VNhpTUlKwbZMfirjN8V+Sm8uahvqA7M2N6/yddPOu36dxTNBJ6HZLDMUbiNKSmMf8VmowQubzc3sKrgAqRK/VO1ULCjDzwn+O44GqvZ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767628458; c=relaxed/simple; bh=s4bpYU2D9zNyZzSffwIbZB3jZKE79HTbncEavptfj+Y=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=GMZL/DlcA2zdizibBfyqw0HmZ/DeWyOpf3V/wsCBgGHQdRBhQfBST/7A6h3EfPacwdGH4Y4zTT6UX8SRbHJ2KBA83lt2l1YeI2J9TYHWRIUW/gVK/lFTCN2IsQtE88taCZcPrChcA3OcF0ghhasrIL3MpRA7FYFFUE8R1r0q2Uo= 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=Uqb2a604; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=hxMukWGS; 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="Uqb2a604"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="hxMukWGS" Date: Mon, 05 Jan 2026 15:54:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1767628454; 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=hy/nqMYATfY2ix8/zEYYdAnTzd6vKPEum9DVtRD31D4=; b=Uqb2a604WkHoZt5Yx3Vc8lpXp4sFF6v31iHacJV1yeLQTZmS8Q3p0UaBzLHgTtbuBPoVZk IfeAkNcCBgnYVsUHn43FMoNqoqpBuz42Ms8pDcVJ8disDNepaOolRHqSegaPnyJx5r1Vi4 DSHLy+vUE7m/Hm7DfAm44ulrQVj5dcZDvymVmIisnPoF0NO1mlmBckeIPkSPw+SR8f6HKj r6/u6pxw56LpqQyPF9G+IqribSncScCB12NaxLlIERtQkkAusUTWcUXlm0DRwb+x4SiQn2 RlUa0G0k58y7Li+v+Ec2uATv5AFL66jYLVXafHRNStJgFsUSPytDSy1Ri7phfg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1767628454; 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=hy/nqMYATfY2ix8/zEYYdAnTzd6vKPEum9DVtRD31D4=; b=hxMukWGShw9KCUIFQwQg0EfAkT/j/6qMo2OzVHnpemr5Fj+ckSqfIhtutiyVk44bIGMfLi Qn2xCcUS6k8rauDQ== From: "tip-bot2 for Marco Elver" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: locking/core] printk: Move locking annotation to printk.c Cc: Marco Elver , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20251219154418.3592607-34-elver@google.com> References: <20251219154418.3592607-34-elver@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <176762845309.510.13863378320054723020.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 locking/core branch of tip: Commit-ID: 8ec56d9aaba9667b0c6429de7aeb4ec691944a5e Gitweb: https://git.kernel.org/tip/8ec56d9aaba9667b0c6429de7aeb4ec69= 1944a5e Author: Marco Elver AuthorDate: Fri, 19 Dec 2025 16:40:22 +01:00 Committer: Peter Zijlstra CommitterDate: Mon, 05 Jan 2026 16:43:36 +01:00 printk: Move locking annotation to printk.c With Sparse support gone, Clang is a bit more strict and warns: ./include/linux/console.h:492:50: error: use of undeclared identifier 'cons= ole_mutex' 492 | extern void console_list_unlock(void) __releases(console_mutex); Since it does not make sense to make console_mutex itself global, move the annotation to printk.c. Context analysis remains disabled for printk.c. This is needed to enable context analysis for modules that include . Signed-off-by: Marco Elver Signed-off-by: Peter Zijlstra (Intel) Link: https://patch.msgid.link/20251219154418.3592607-34-elver@google.com --- include/linux/console.h | 4 ++-- kernel/printk/printk.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/console.h b/include/linux/console.h index fc9f5c5..f882833 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -492,8 +492,8 @@ static inline bool console_srcu_read_lock_is_held(void) extern int console_srcu_read_lock(void); extern void console_srcu_read_unlock(int cookie); =20 -extern void console_list_lock(void) __acquires(console_mutex); -extern void console_list_unlock(void) __releases(console_mutex); +extern void console_list_lock(void); +extern void console_list_unlock(void); =20 extern struct hlist_head console_list; =20 diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 1d765ad..37d16ef 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -245,6 +245,7 @@ int devkmsg_sysctl_set_loglvl(const struct ctl_table *t= able, int write, * For console list or console->flags updates */ void console_list_lock(void) + __acquires(&console_mutex) { /* * In unregister_console() and console_force_preferred_locked(), @@ -269,6 +270,7 @@ EXPORT_SYMBOL(console_list_lock); * Counterpart to console_list_lock() */ void console_list_unlock(void) + __releases(&console_mutex) { mutex_unlock(&console_mutex); }