lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3cd14138-0ae5-4837-9218-5c5b5708fe49@paulmck-laptop>
Date: Tue, 20 Aug 2024 10:49:56 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: John Ogness <john.ogness@...utronix.de>
Cc: Petr Mladek <pmladek@...e.com>,
	Sergey Senozhatsky <senozhatsky@...omium.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org,
	Miguel Ojeda <ojeda@...nel.org>
Subject: Re: [PATCH printk v8 01/35] printk: Add notation to console_srcu
 locking

On Tue, Aug 20, 2024 at 08:35:27AM +0206, John Ogness wrote:
> 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 <john.ogness@...utronix.de>
> Reviewed-by: Petr Mladek <pmladek@...e.com>

Acked-by: Paul E. McKenney <paulmck@...nel.org>

> ---
>  kernel/printk/printk.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index c22b07049c38..93c67eb7ca9e 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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ