Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1427759lqm; Thu, 2 May 2024 14:46:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUxlvdMFp4c3K50XIw+RN9cGUUdhmlMtt9WiZyp2XG/+K44++N1c6IQMIn0oF9Wxm7CSiv8YSvNY/Xb5AmVt1fPAnccLwO0EI2Ilq6PVA== X-Google-Smtp-Source: AGHT+IHIfq/9xl5sh5TemhJA8KBhuciQla0LamHCdEe9MK0F/V6BXjrgyawLwJ00Y+J11ggVySSQ X-Received: by 2002:a17:902:e749:b0:1ec:6b87:e125 with SMTP id p9-20020a170902e74900b001ec6b87e125mr1118502plf.50.1714686408307; Thu, 02 May 2024 14:46:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714686408; cv=pass; d=google.com; s=arc-20160816; b=kjeWW5p9eRYw6TlcfyLnExBYm0isSBcZ1YMUi17FT97yoD08HxN65rHOPoJsVr+RxE bm7Jmho9YMnAqFWKGKfBcx+vDhnVCV9IgSvUVYFHv73JUzDd9fKjicYE9a0lBFmO7YSx kVMqpmDIdTEZ/bq6EU8a9FwQSCldTGtIjzH2TuUYkfgy4fIientRSQQNnazG/Js+fckS NuLjostdWsKBFUnrNgdl1NMbEi6n5/enrcceLO4euDkcaPISd03D8qlukprWc585zjU4 ydN9/Fx2/5SWzrYx5OMJ3F86lGHCM6SQayDAM/f3u+cxz8Y7qBbTWGRuJgghdv62732Y IE8Q== 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=Ox+A9OiQRHtBOiGNDylfYinUci+eWbT7PLuV77Q3CEZ+PMGJ/pdRh3sPjRx0UxvvYT ppspTXHVyAxGJAldy40xXMl4+Cmrixo6MA1tpYtfi7Cs+BKsrk16r8yu6bFOjrk0WM0l Th2l8I5XnOJpGYiy0gAk1pd2kZijvvmKMDKxe9VAPZGPzfFbRQK0GlQuBpIHg28GHJCp o+CS1wfUhbQ8PY2Dz7kmoLu4gkXC721Y4GrnfNe4R0fB9JPlki9trz28F1XzyFynpUwO 0lFQFGFBY+XZMPMB/Tci7aSsA4P1hNUr4JlCaz4M21erelEa3wzAq/Cxn4UpOHk3pf6q rbZQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=uz1bhtTp; 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-166951-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166951-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. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id im15-20020a170902bb0f00b001ed3ad04f70si17908plb.301.2024.05.02.14.46.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 14:46:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166951-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=uz1bhtTp; 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-166951-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166951-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 E4B66B244AC for ; Thu, 2 May 2024 21:38:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2AE94181D05; Thu, 2 May 2024 21:38:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="uz1bhtTp"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="BDzcvGoh" 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 DD2001DDF8 for ; Thu, 2 May 2024 21:38:45 +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=1714685927; cv=none; b=ch92jPj8xCLk3tY8xWEylePnIZjVsoF1ZlDXsyLSNKpYnrwd606JDIr8w3FAbNCSM7JSyMaKcSzXoA4RW1bhZn/egpcAnHmL7EMiCJ33UBI42970sZ+DArhDlTPquoH5OFjqld5AWD1cqSMvxVCrMdAqoch/t61zabJR+5AVTnA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714685927; c=relaxed/simple; bh=+x0B0DKqCUuY5JhcpCChNmzn4DAXIu7FX0iwPh4yj00=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gPQFCCxDTbgm8OZiJOtoX+7xXaJvLXCBYrnsN7ivE9p5XYFKGO8AqltZ+TBS8KMto7HID9tm64RqRuoFGy7dRcNMQW5l1CPB8fbTAaVfY6V32eih8D8fsh68X2mqIK4gK5nhaEr8Cvf0CZiqTzyPvtxCN8LD6wlJ6h8j5YCQHEY= 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=uz1bhtTp; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=BDzcvGoh; 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=1714685924; 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=uz1bhtTpgjos+cZ2g3IwiFLhNzOdWw9j8mS9gMg+PWeDfG39cr0+ScxrCR12iuz22Hs3BF m9UthHCxaKUmIqqZv4qe5v/PbBzdUwGhI9sfpJBoWrZc2a9K9TXTzNcjStYaZGD5qRqGjW VCM3rFYxYcC8pKGwsGfFiVarbJ45LxqfcFWK9JEqvK5kyTIq33VfS0qsC1HfKwT5e5+MTj bIpu8nO/c75Otr5H6eO1W0cOFsynCUHEWZdGwyeRHhmSsiLeW5EeowlCNLU3h7xwyagB5l EqdxPo6obrJVoPtYtePXbDTCSrjhxsn6lp21yJw4CeIFBQmC37YSHGyUln4EVg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1714685924; 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=BDzcvGohSvy38CtWxEEQFhEkqw5Gte97pjf8KmhK1JNEQ/yIWScYi7GSkwTevQ552O8SPi RqhxC3F0l8q9GfAA== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, "Paul E. McKenney" , Miguel Ojeda Subject: [PATCH printk v5 01/30] printk: Add notation to console_srcu locking Date: Thu, 2 May 2024 23:44:10 +0206 Message-Id: <20240502213839.376636-2-john.ogness@linutronix.de> In-Reply-To: <20240502213839.376636-1-john.ogness@linutronix.de> References: <20240502213839.376636-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