[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100310131317.GA6267@linux.vnet.ibm.com>
Date: Wed, 10 Mar 2010 05:13:18 -0800
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
Arnd Bergmann <arnd@...db.de>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Stephen Hemminger <shemminger@...tta.com>
Subject: Re: [PATCH 6/13] bridge: Add core IGMP snooping support
On Wed, Mar 10, 2010 at 06:49:07PM +0800, Herbert Xu wrote:
> On Wed, Mar 10, 2010 at 11:39:43AM +0100, Eric Dumazet wrote:
> >
> > Its really rcu_dereference_bh() that could/should be used:
> > I see no problem changing
> >
> >
> > local_bh_disable();
> > ...
> > rcu_read_lock();
> > rcu_dereference(rt_hash_table[h].chain);
> > rcu_read_unlock();
> > ...
> > local_bh_enable();
>
> Why don't we just ignore the bh part for rcu_dereference?
>
> After all it's call_rcu_bh and the other primitives that we really
> care about. For rcu_dereference bh should make no difference
> whatsoever.
If CONFIG_PROVE_RCU is set, rcu_dereference() checks for rcu_read_lock()
and rcu_dereference_bh() checks for either rcu_read_lock_bh() or BH
being disabled. Yes, this is a bit restrictive, but there are a few too
many to check by hand these days.
Thanx, Paul
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists