Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2361432lqz; Tue, 2 Apr 2024 15:24:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWbPrUK0kK0T/vlS82rL2JVIK5w+9RrNWrLCuRemIDl0ZExO1jqMdQzZ8BbSuIu3NuepStxIhp73/BlLDo74Id5893HtpuXaxj73LBn5g== X-Google-Smtp-Source: AGHT+IG5mFklkGMEDH1V50TEl6the7ysmIl/URN92oUUSlrPns8an5QF0MA2EjdIoPFgIxFNEw2E X-Received: by 2002:a05:6a20:2d22:b0:1a3:8984:b334 with SMTP id g34-20020a056a202d2200b001a38984b334mr1507396pzl.22.1712096677678; Tue, 02 Apr 2024 15:24:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712096677; cv=pass; d=google.com; s=arc-20160816; b=Cb2vloSiw6VWZNthFjRYGWEjhmXn/k55Fwb692G1f87jH/5008j4vcFlwveASwqbXU Xutq6a28zRHcTaznYGmg5NhfHGv/RmeLviztPCygGh9eEtS+O+GRuR3feAM2NS4VqPYQ 1jwDwvzdRCmPGpPJoYgo2AifvX4+zsyfS9p20KFaagDVleRvDKavSznV8b8hAQxQTNQS /sTwLvs5bccmBswIIqR1JRYN6bWuCyTxnugZPAyIdKKVyanW9dkWaNekBNouP6/4KJVm fH22zkc8edd2ZhO4i2cwEM0io4aSe8G7/BzBXMyFhnXMpS8WvGdehrxkqXiYpT5uVKda 3Yhg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:dkim-signature:dkim-signature:from; bh=CzegSW+30fFMD0MZbnfdPKJm1E+ZrdzFvhWkWJc/40c=; fh=a6PlBcCqPO31Epka5dxjnwiWwHh9gUemen5SmxnHSfE=; b=dxKnCUIl0cw5Ud3/D1hcd0H+Sp6cPUoA/So8ua/tI0BCYnyUIvsw37R+FKr3UGpSjc SrVhoPkwDlAScFQ6oNBPSQOIq3T53M0RXRXcMrAq//PirzMO9pA7Lvi+UbojGMSaCMZb mdXIGUPBbLsNP8Ry2JfWIdIpsA3eOH2HYg3lwmaQBnyu6PmcEws5fLMfINQDjXn1XfYs Mo4nS4U7IqdbSID/KhftCFjSYZqgwPexHi3BKTPCrBpHMBJxWdw/P026wMIiz/hanZS8 wdfD7NP6v0uvHZa5QCBFJB/LkTo6XU6V1w6jk7/Xb87LBZ/VO4qrDQMxLPXm8eIV0tLU +9ng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zfeJcwKX; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-128760-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128760-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id f4-20020a056a00238400b006eaf0665127si9182384pfc.306.2024.04.02.15.24.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 15:24:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-128760-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zfeJcwKX; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-128760-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128760-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2DE29B25325 for ; Tue, 2 Apr 2024 22:11:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1020115ECE7; Tue, 2 Apr 2024 22:11:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="zfeJcwKX"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="RidmNc0j" 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 35D3615ECC8 for ; Tue, 2 Apr 2024 22:11:34 +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=1712095897; cv=none; b=VmwULyNOglSwapPbrQjtLeW+bzArM3+Si8cM3lv7UcsnAPSsViK/oC8aHVDfjsGWYSNiMFeJ1ibCdliciTo5jUGe0e4rCrpc3kp7+uWnma4QayGvASnhEnrlV8yzcQ2KVuGNPvANCGnqqxr+UW+T/ozx8NAPltYZihc3VmLa9eU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712095897; c=relaxed/simple; bh=+x0B0DKqCUuY5JhcpCChNmzn4DAXIu7FX0iwPh4yj00=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=siHsjFuApnHeb37tMdebiVV+Z8qlPhUSvFtD99KOLi6YiK6Syrmxqsc97o4+vWeMB7R8UN+y+1dMxkNWlnd5+1ihlRgxCrfjA2ma5oqHDDUMvEEXPZNSX8STD7pFmWJDG/CCrgIQdzeIFgGk+QqI9aSi8Z44O2VsTrVrnOKff6I= 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=zfeJcwKX; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=RidmNc0j; 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 From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712095893; 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=CzegSW+30fFMD0MZbnfdPKJm1E+ZrdzFvhWkWJc/40c=; b=zfeJcwKXXHueMeEDEdn+JAzbBB+a+cmmZB6wnzsurIJSMy/SqfjAjh2V5MUm/NrWa2zXTk Z7dhpE53PB76B58ipZT3lxvj5xIn1tA9fuEvDyphswzxJ7g4r0BbQJge+dsfTjvqF6p06n N8E47VK8slzHXvtUq52cCiJJ0DmqAVBgsxhyWJsbpDI3WdOlWSh/wPHdRCkT7cvE7PCceT whKxtcbBiQ+ZkeH/uzOsruzxRZ6GTcGEd5w94FO51fxCLvO0Jd6DwxGCHptlXBbIY8lWm1 JkjFPDf+9j9Ut9gTdhlQ5jRCe0brAW/Vr86yZlu0QfyAZ/Wai5HZnVROvPSaxw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712095893; 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=CzegSW+30fFMD0MZbnfdPKJm1E+ZrdzFvhWkWJc/40c=; b=RidmNc0jX4fyRo2z6VZIWtpwsDGh6TsQrdJrlUZsVI6g88Dp5ol2HgzFwVqh3pld12EfdD DXNwIFK9Bn4OhNBw== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, "Paul E. McKenney" , Miguel Ojeda Subject: [PATCH printk v4 01/27] printk: Add notation to console_srcu locking Date: Wed, 3 Apr 2024 00:17:03 +0206 Message-Id: <20240402221129.2613843-2-john.ogness@linutronix.de> In-Reply-To: <20240402221129.2613843-1-john.ogness@linutronix.de> References: <20240402221129.2613843-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: 8bit 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 Fixes: 6c4afa79147e ("printk: Prepare for SRCU console list protection") Signed-off-by: John Ogness --- kernel/printk/printk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 612c73333848..c7c0ee2b47eb 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); } -- 2.39.2