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: <20110502222147.GL2294@linux.vnet.ibm.com>
Date:	Mon, 2 May 2011 15:21:47 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Josh Triplett <josh@...htriplett.org>
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,
	patches@...aro.org
Subject: Re: [PATCH tip/core/rcu 45/86] net,act_police,rcu: remove
 rcu_barrier()

On Mon, May 02, 2011 at 10:50:11AM -0700, Josh Triplett wrote:
> On Mon, May 02, 2011 at 01:36:18AM -0700, Paul E. McKenney wrote:
> > On Sun, May 01, 2011 at 08:59:35AM -0700, Josh Triplett wrote:
> > > On Sun, May 01, 2011 at 06:21:25AM -0700, Paul E. McKenney wrote:
> > > > From: Lai Jiangshan <laijs@...fujitsu.com>
> > > > 
> > > > There is no callback of this module maybe queued
> > > > since we use kfree_rcu(), we can safely remove the rcu_barrier().
> > > > 
> > > > Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
> > > > Acked-by: David S. Miller <davem@...emloft.net>
> > > > Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> > > > ---
> > > >  net/sched/act_police.c |    1 -
> > > >  1 files changed, 0 insertions(+), 1 deletions(-)
> > > > 
> > > > diff --git a/net/sched/act_police.c b/net/sched/act_police.c
> > > > index d6bcd64..b3b9b32 100644
> > > > --- a/net/sched/act_police.c
> > > > +++ b/net/sched/act_police.c
> > > > @@ -396,7 +396,6 @@ static void __exit
> > > >  police_cleanup_module(void)
> > > >  {
> > > >  	tcf_unregister_action(&act_police_ops);
> > > > -	rcu_barrier(); /* Wait for completion of call_rcu()'s (tcf_police_free_rcu) */
> > > >  }
> > > 
> > > Very nice side-effect of having common callback code.  Seems worth doing
> > > a review of other callers of rcu_barrier as well, to see if they still
> > > need to do so.
> > 
> > Agreed, and good point on the review.  /me wonders how this review could
> > be automated...
> 
> Build everything as a module, and for each module check whether it uses
> the symbol rcu_barrier but not the symbol call_rcu.  Same for the
> corresponding call_rcu_sched and call_rcu_bh.

Good point -- I will give this a shot when I find AC power.

> Also, Coccinelle could likely handle simple cases of
> call_rcu(function_that_calls_container_of_then_kfree), at least when
> the call and the function appear in the same source file.

Good point -- it wasn't too hard by hand this time, but it would be
a good addition to RCU checking.

							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