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]
Date:	Tue, 20 Apr 2010 20:14:10 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Li Zefan <lizf@...fujitsu.com>
Cc:	Eric Paris <eparis@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Eric Paris <eparis@...isplace.org>,
	Miles Lane <miles.lane@...il.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: INFO: suspicious rcu_dereference_check() usage -
 include/linux/cgroup.h:492 invoked rcu_dereference_check() without
 protection!

On Wed, Apr 21, 2010 at 09:05:50AM +0800, Li Zefan wrote:
> > commit 2836f18139267ea918ed2cf39023fb0eb38c4361
> > Author: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> > Date:   Mon Apr 19 15:59:50 2010 -0700
> > 
> >     rcu: fix RCU lockdep splat on freezer_fork path
> >     
> >     Add an RCU read-side critical section to suppress this false positive.
> >     
> >     Located-by: Eric Paris <eparis@...isplace.org>
> >     Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> > 
> > diff --git a/kernel/cgroup_freezer.c b/kernel/cgroup_freezer.c
> > index da5e139..e5c0244 100644
> > --- a/kernel/cgroup_freezer.c
> > +++ b/kernel/cgroup_freezer.c
> > @@ -205,9 +205,12 @@ static void freezer_fork(struct cgroup_subsys *ss, struct task_struct *task)
> >  	 * No lock is needed, since the task isn't on tasklist yet,
> >  	 * so it can't be moved to another cgroup, which means the
> >  	 * freezer won't be removed and will be valid during this
> > -	 * function call.
> > +	 * function call.  Nevertheless, apply RCU read-side critical
> > +	 * section to suppress RCU lockdep false positives.
> >  	 */
> 
> It was me that added the original comment.
> 
> > +	rcu_read_lock();
> >  	freezer = task_freezer(task);
> > +	rcu_read_unlock();
> >  
> >  	/*
> >  	 * The root cgroup is non-freezable, so we can skip the
> 
> Acked-by: Li Zefan <lizf@...fujitsu.com>

Thank you, Li!  I have added your Acked-by.

							Thanx, Paul
--
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