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] [day] [month] [year] [list]
Message-ID: <cdc3a34a-9533-4f0c-bd2a-3796aeed161c@paulmck-laptop>
Date: Fri, 25 Oct 2024 15:55:46 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Frederic Weisbecker <frederic@...nel.org>,
	Neeraj Upadhyay <neeraj.upadhyay@...nel.org>,
	Joel Fernandes <joel@...lfernandes.org>,
	Josh Triplett <josh@...htriplett.org>,
	Boqun Feng <boqun.feng@...il.com>,
	Uladzislau Rezki <urezki@...il.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Lai Jiangshan <jiangshanlai@...il.com>,
	Zqiang <qiang.zhang1211@...il.com>, rcu@...r.kernel.org,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH next] rcu: Unlock correctly in rcu_dump_cpu_stacks()

On Fri, Oct 25, 2024 at 10:06:43AM +0300, Dan Carpenter wrote:
> The unlock needs to be outside the } close curly braces for this if
> statement.  Otherwise it leads to a deadlock.
> 
> Fixes: 744e87210b1a ("rcu: Finer-grained grace-period-end checks in rcu_dump_cpu_stacks()")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>

Good catch!

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

This is a regression from this past merge window, if I am keeping track.
So it is a candidate for going in before the next merge window opens.

							Thanx, Paul

> ---
>  kernel/rcu/tree_stall.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h
> index 8994391b95c7..925fcdad5dea 100644
> --- a/kernel/rcu/tree_stall.h
> +++ b/kernel/rcu/tree_stall.h
> @@ -357,8 +357,8 @@ static void rcu_dump_cpu_stacks(unsigned long gp_seq)
>  					pr_err("Offline CPU %d blocking current GP.\n", cpu);
>  				else
>  					dump_cpu_task(cpu);
> -			raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
>  			}
> +			raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
>  		}
>  		printk_deferred_exit();
>  	}
> -- 
> 2.45.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ