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: <20120615204048.GF31184@leaf>
Date:	Fri, 15 Jun 2012 13:40:48 -0700
From:	Josh Triplett <josh@...htriplett.org>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
	dipankar@...ibm.com, akpm@...ux-foundation.org,
	mathieu.desnoyers@...ymtl.ca, niv@...ibm.com, tglx@...utronix.de,
	peterz@...radead.org, rostedt@...dmis.org, Valdis.Kletnieks@...edu,
	dhowells@...hat.com, eric.dumazet@...il.com, darren@...art.com,
	fweisbec@...il.com, patches@...aro.org,
	"Paul E. McKenney" <paul.mckenney@...aro.org>
Subject: Re: [PATCH tip/core/rcu 01/14] rcu: Fix detection of abruptly-ending
 stall

On Fri, Jun 15, 2012 at 01:13:02PM -0700, Paul E. McKenney wrote:
> From: "Paul E. McKenney" <paul.mckenney@...aro.org>
> 
> The code that attempts to identify stalls that end just as we detect
> them is broken by both flavors of initialization failure.  This commit
> therefore properly initializes and computes the count of the number
> of reasons why the RCU grace period is stalled.
> 
> Signed-off-by: Paul E. McKenney <paul.mckenney@...aro.org>
> Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>

This approach definitely seems more robust against future code changes.

Reviewed-by: Josh Triplett <josh@...htriplett.org>

> ---
>  kernel/rcutree.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/rcutree.c b/kernel/rcutree.c
> index 0da7b88..0f04480 100644
> --- a/kernel/rcutree.c
> +++ b/kernel/rcutree.c
> @@ -732,7 +732,7 @@ static void print_other_cpu_stall(struct rcu_state *rsp)
>  	int cpu;
>  	long delta;
>  	unsigned long flags;
> -	int ndetected;
> +	int ndetected = 0;
>  	struct rcu_node *rnp = rcu_get_root(rsp);
>  
>  	/* Only let one CPU complain about others per time interval. */
> @@ -773,7 +773,7 @@ static void print_other_cpu_stall(struct rcu_state *rsp)
>  	 */
>  	rnp = rcu_get_root(rsp);
>  	raw_spin_lock_irqsave(&rnp->lock, flags);
> -	ndetected = rcu_print_task_stall(rnp);
> +	ndetected += rcu_print_task_stall(rnp);
>  	raw_spin_unlock_irqrestore(&rnp->lock, flags);
>  
>  	print_cpu_stall_info_end();
> -- 
> 1.7.8
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ