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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 21 Feb 2012 10:28:04 -0800
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
	dipankar@...ibm.com, akpm@...ux-foundation.org,
	mathieu.desnoyers@...ymtl.ca, josh@...htriplett.org,
	niv@...ibm.com, tglx@...utronix.de, rostedt@...dmis.org,
	Valdis.Kletnieks@...edu, dhowells@...hat.com,
	eric.dumazet@...il.com, darren@...art.com, fweisbec@...il.com,
	patches@...aro.org, Hugh Dickins <hughd@...gle.com>
Subject: Re: [PATCH tip/core/rcu 3/4] rcu: stop spurious warnings from
 synchronize_sched_expedited

On Tue, Feb 21, 2012 at 07:00:17PM +0100, Peter Zijlstra wrote:
> On Tue, 2012-02-21 at 09:58 -0800, Paul E. McKenney wrote:
> > From: Hugh Dickins <hughd@...gle.com>
> > 
> > synchronize_sched_expedited() is spamming CONFIG_DEBUG_PREEMPT=y
> > users with an unintended warning from the cpu_is_offline() check:
> > use raw_smp_processor_id() instead of smp_processor_id() there.
> 
> This fails to mention why it makes sense to test a random cpu for
> offline-ness..

The check was already there, Hugh simply fixed it to use raw_.  The check
itself was added in c0d6d01bf (Check for illegal use of RCU from offlined
CPUs).  The purpose is to catch improper use of RCU from CPU_DYING
notifiers and on the path from the CPU_DYING notifiers to the idle loop.

							Thanx, Paul

> > Signed-off-by: Hugh Dickins <hughd@...gle.com>
> > Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> > ---
> >  kernel/rcutree.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/kernel/rcutree.c b/kernel/rcutree.c
> > index eacc10b..1050d6d 100644
> > --- a/kernel/rcutree.c
> > +++ b/kernel/rcutree.c
> > @@ -2014,7 +2014,7 @@ void synchronize_sched_expedited(void)
> >  	/* Note that atomic_inc_return() implies full memory barrier. */
> >  	firstsnap = snap = atomic_inc_return(&sync_sched_expedited_started);
> >  	get_online_cpus();
> > -	WARN_ON_ONCE(cpu_is_offline(smp_processor_id()));
> > +	WARN_ON_ONCE(cpu_is_offline(raw_smp_processor_id()));
> >  
> >  	/*
> >  	 * Each pass through the following loop attempts to force a
> 

--
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