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: <20100330155023.GA2513@linux.vnet.ibm.com>
Date:	Tue, 30 Mar 2010 08:50:24 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Lai Jiangshan <laijs@...fujitsu.com>
Cc:	Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rcu: more careful check for the last non-dyntick-idle
 CPU

On Tue, Mar 30, 2010 at 06:40:36PM +0800, Lai Jiangshan wrote:
> Warning: I just did build test.
> 
> Subject: [PATCH] rcu: more careful check for the last non-dyntick-idle CPU
> 
> If a CPU is not in nohz_cpu_mask, it does not means this
> CPU is a non-dyntick-idle CPU, because this CPU may be offline or not exist.

Good catch, queued, thank you!

							Thanx, Paul

> Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
> ---
> diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
> index 4befb64..6086a7d 100644
> --- a/kernel/rcutree_plugin.h
> +++ b/kernel/rcutree_plugin.h
> @@ -1026,7 +1026,7 @@ int rcu_needs_cpu(int cpu)
> 
>  	/* Don't bother unless we are the last non-dyntick-idle CPU. */
>  	for_each_cpu_not(thatcpu, nohz_cpu_mask)
> -		if (thatcpu != cpu) {
> +		if (cpu_online(thatcpu) && thatcpu != cpu) {
>  			per_cpu(rcu_dyntick_drain, cpu) = 0;
>  			per_cpu(rcu_dyntick_holdoff, cpu) = jiffies - 1;
>  			return rcu_needs_cpu_quick_check(cpu);
--
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