Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1876157lqb; Sun, 26 May 2024 23:38:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWkqDrEAJF4cORSMYqCBMtTftUG3KW9zlLjXdBaoRasEgVKUYrddgcG1pPVIGrwkN/iOJouwD4WlD1/dZkcuPto0OtWx7neYGMTmnCkiw== X-Google-Smtp-Source: AGHT+IEfDnSTGxz7TXn65/diQv0rLK9Dkj1WzoaVc4J6tiN4pd4ATNrME0yHwNtNezHewWYeRwEc X-Received: by 2002:a05:6a00:408d:b0:6ec:fdfe:9bde with SMTP id d2e1a72fcca58-6f8f3d6909cmr8781501b3a.25.1716791911875; Sun, 26 May 2024 23:38:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716791911; cv=pass; d=google.com; s=arc-20160816; b=qGgkRNNhupsu3VUkd8mevACOPRAJaZPInrc2UI+ck5iFNlkRELoJLrYRJ/6VUht/aa UjNnzHYVCLZg2fogn4C1quMW7duk8Q4awWkLaT7Xn+fafGMBXEuU2SIm6uWoxlTBOzlq 5fbEmi12JQwc53ixjNEuLX1Q1uZmmIl6ny1sNuqOwj1+AqHRCEiurigZm5hBPAIsR8DP dk7XoyR9pD6gBhRdZxCTkFYTOlQCwoHjLICK+FMzMFJHiH4TuvMmkuO1NKggfLhyQxkf 8NGDlZKvl5+VitA7h/hoktNAgEO85GB371q/Z5QxOwU0vUPgTBSZYl/Ckbj3PqiQX8bm NW7w== 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=6ivuBM37dQqLptpOvVQ5pDKTeLxrWvfxf7hXSdzp6yc=; fh=a6PlBcCqPO31Epka5dxjnwiWwHh9gUemen5SmxnHSfE=; b=TkDYutWqMEGY84UIN7pTQRGbQrmFSVTv8HSXhOwF6TgyAi6F+8T4YTl3ZYxm0o4QVr jVtKZqwqLf38VUl9VaOKg/46Ec5lt/0EE6fF27USNybHDVSQnU+3/oGsl86yllkFJH7k t0LC1iXy6nPw7RS3FLeDMmmXoyaLMqe87zVrH+uKF2ldhYb3+lmrx1d26IeeGt9Uy8sR z8Al0zqSDhQmeiZ8fi1apfCKbaMCzKtjFHF1a9PfYrbniFp5/WJuorke1rDzH0DmZTgD vlyaBVRlLlOcEMNBPDZKYozuutB3M+UGknH9d7WJQtvE/E2n0R37iGVij8AZF4JzGFon +2jA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=AoNGwTjf; 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-190074-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190074-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f8fd9dd3e1si5430598b3a.350.2024.05.26.23.38.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 23:38:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190074-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=AoNGwTjf; 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-190074-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190074-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id CE3892813E7 for ; Mon, 27 May 2024 06:38:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 304AD17559; Mon, 27 May 2024 06:38:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="AoNGwTjf"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Q8opQKl9" 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 C602C208D1 for ; Mon, 27 May 2024 06:38:18 +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=1716791900; cv=none; b=PcOjPWHIckVyCpQkdkqe8SEKTxPAw7k2FpBLIWwTnEN7gHBbvXlizjeogf0Gau85F91X5+3EjGGkVzoTXSjaX3PPzMv9pZ7S51cHXD+SW9mlR9HTtJUZhjQ2uFGPvh/yDuyVidTg0oPET7IpiBte3oXx5yPELNhDB04rqGoQiTs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716791900; c=relaxed/simple; bh=+dn/emmEEkcbSG39cIwrkA2wVajPNCrfmui1Y4Bjb98=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BJ6Fa51zR2Bpf/HATl7WIT3BWqF5YT5FVydlMKi/FbmQcpHmhJdDA0BORgrwkFqkPTp5x+N+C2hACyNEgyTMDlifrwJcwdURTh+u4kol11Fp1RtrGl8v+TRcJZjVu2pGC452g0DNfr3P4OG1I2Dk2wPN05bDEDWhvfHCHrR+s88= 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=AoNGwTjf; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Q8opQKl9; 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=1716791896; 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=6ivuBM37dQqLptpOvVQ5pDKTeLxrWvfxf7hXSdzp6yc=; b=AoNGwTjfxYrNKExIOJhnh8w80Pp6zrVg/HR1fZKPmXjcSGGu+skf9UJ/sQaxjYnkofAm/z pIledchn374Bqei75B9bG0eMVSKbfo085gEehJEZxnBl3oQ+pB/51N5qjnN5bCEuk7Esgu TX+z9bADX8/A+5eASDPZjZ109kkfsF9PX6IACZkCAe6yMObkJP5p4S8y2kYPvVSaxrGYOW xhj7bg1T0x6+eZhuALV5PbkQ/0/ZttAxKkvMQOwBeqjXtJsjcf19w5WrwwxSCmKrtPGScr iq4wNvjmMv4o+qLBBHSL0QQkzcWvjwM34haaNs9GuE6HMBEByHeh4i09cIzjRw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1716791896; 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=6ivuBM37dQqLptpOvVQ5pDKTeLxrWvfxf7hXSdzp6yc=; b=Q8opQKl96KesAmk8O7lXPZlE+Nen47I57u/aKpdAoSqq7eUSbNEjZerbZkeSM4uXInJ966 dU1g4noQMaeJPcCw== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, "Paul E. McKenney" , Miguel Ojeda Subject: [PATCH printk v6 01/30] printk: Add notation to console_srcu locking Date: Mon, 27 May 2024 08:43:20 +0206 Message-Id: <20240527063749.391035-2-john.ogness@linutronix.de> In-Reply-To: <20240527063749.391035-1-john.ogness@linutronix.de> References: <20240527063749.391035-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 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 8de6a46a056c..6efb629fd976 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