From nobody Fri Dec 19 21:49:49 2025 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 376B725772 for ; Sun, 18 Feb 2024 18:57:52 +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=1708282673; cv=none; b=o7HLDI/U5H2AhiZmJpMmM6RDRqPoQIjW169gqqxSuXF2nhbU4X5Leh8SB+bYMCKHfjJGIPzRgo7VCb8VGPx3jGEpdTGHOhcZoj9va+cpbhLXRzoOcTMwGOwCnwShL8iq2IuIxol9erraH5sLYGivT9/5WjZElnz42sc+L91duKI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708282673; c=relaxed/simple; bh=szxbYO6I4lhZ0tittilU4W8LlO/EcPP5ZLOScG+pyp4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=f81GMo2NjMSd90QLGQq86KEuLjh2hfMjI5uVaYyQr+YjEG3OxrKmTlVl3X8LnYBtFgj66OYakSNfRYA2Sq/aaQWBjk6nTIWgGN8V0Yx3/iPZCv2OuAvhM9gMWbW0eWNFkD8dWXhmIZd2yBQm+DSnE18WEsTt1gpaDLC7zdwETxI= 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=qrnb2FPQ; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=TZBO/V1B; 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="qrnb2FPQ"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="TZBO/V1B" From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708282669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4Un0rwRwZZ3a2XT9jb+evA7D9ZWLwutkDIt2olFNBSM=; b=qrnb2FPQWgUIoPQJwgH3E7DufsQ8IsmtrQQqmcYm22LHa2RlOcWRaeSgLnTFRkhmI+mqtI LRtd+VTf3IGtSg31pnViD3VR4oQLjkg/aygbOYwww0ug90EJiO7B0J2tW815u+ZjEbJ2L7 aXR2jDLA0+TBCYwEQzB2/sxQTpYFEI8RPyW5XDMBYMHWL1pAxkd9SBV82uAdo7iMHesD38 WRuCisj15Tlbb3l3AEKayPiqVcSXandv/cN4vbqodVlGzOWCbAH+ssr8l8CDm7k3kZuMNt CVTx2lQTuI+sOT63pugYF4DZCMWzYNhlyYfNKl9HVk47k8XSDkbqVUxCyXX39w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708282669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4Un0rwRwZZ3a2XT9jb+evA7D9ZWLwutkDIt2olFNBSM=; b=TZBO/V1Bg1bIdmb66zgE0251XZPPIH3YGi9O+tOmQDQ3pr7l4tHkAdFsCwv7sEQgcEqLRv 77OR8OHaSoy8eBCg== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, "Paul E. McKenney" , Miguel Ojeda , kernel test robot Subject: [PATCH printk v2 05/26] printk: Add notation to console_srcu locking Date: Sun, 18 Feb 2024 20:03:05 +0106 Message-Id: <20240218185726.1994771-6-john.ogness@linutronix.de> In-Reply-To: <20240218185726.1994771-1-john.ogness@linutronix.de> References: <20240218185726.1994771-1-john.ogness@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" kernel/printk/printk.c:284:5: sparse: sparse: context imbalance in 'console_srcu_read_lock' - wrong count at exit include/linux/srcu.h:301:9: sparse: sparse: context imbalance in 'console_srcu_read_unlock' - unexpected unlock Reported-by: kernel test robot Fixes: 6c4afa79147e ("printk: Prepare for SRCU console list protection") Signed-off-by: John Ogness Reviewed-by: Petr Mladek --- kernel/printk/printk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 696a9d76c09c..b75ca383683d 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -282,6 +282,7 @@ EXPORT_SYMBOL(console_list_unlock); * Return: A cookie to pass to console_srcu_read_unlock(). */ int console_srcu_read_lock(void) + __acquires(&console_srcu) { return srcu_read_lock_nmisafe(&console_srcu); } @@ -295,6 +296,7 @@ EXPORT_SYMBOL(console_srcu_read_lock); * Counterpart to console_srcu_read_lock() */ void console_srcu_read_unlock(int cookie) + __releases(&console_srcu) { srcu_read_unlock_nmisafe(&console_srcu, cookie); } --=20 2.39.2