Message ID | 20100321213703.GD2517@linux.vnet.ibm.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Date: Sun, 21 Mar 2010 14:37:03 -0700 > net: suppress lockdep-RCU false positive in FIB trie. > > Allow fib_find_node() to be called either under rcu_read_lock() > protection or with RTNL held. > > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Thanks guys, I applied this copy and added Eric's signoff since the two patches were essentially identical :-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sun, Mar 21, 2010 at 06:01:40PM -0700, David Miller wrote: > From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> > Date: Sun, 21 Mar 2010 14:37:03 -0700 > > > net: suppress lockdep-RCU false positive in FIB trie. > > > > Allow fib_find_node() to be called either under rcu_read_lock() > > protection or with RTNL held. > > > > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> > > Thanks guys, I applied this copy and added Eric's signoff > since the two patches were essentially identical :-) Great minds thinking alike and all that. ;-) Thanx, Paul -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index af5d897..01ef8ba 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c @@ -961,7 +961,9 @@ fib_find_node(struct trie *t, u32 key) struct node *n; pos = 0; - n = rcu_dereference(t->trie); + n = rcu_dereference_check(t->trie, + rcu_read_lock_held() || + lockdep_rtnl_is_held()); while (n != NULL && NODE_TYPE(n) == T_TNODE) { tn = (struct tnode *) n;