]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
fib: suppress lockdep-RCU false positive in FIB trie.
authorEric Dumazet <eric.dumazet@gmail.com>
Wed, 14 Apr 2010 23:13:29 +0000 (16:13 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Apr 2010 23:13:29 +0000 (16:13 -0700)
Followup of commit 634a4b20

Allow tnode_get_child_rcu() to be called either under rcu_read_lock()
protection or with RTNL held.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_trie.c

index 59a838795e3e6cf93ba919676ae68804c8b8a00a..c98f115fb0fde6d97136695075fa45c04976c4be 100644 (file)
@@ -209,7 +209,9 @@ static inline struct node *tnode_get_child_rcu(struct tnode *tn, unsigned int i)
 {
        struct node *ret = tnode_get_child(tn, i);
 
-       return rcu_dereference(ret);
+       return rcu_dereference_check(ret,
+                                    rcu_read_lock_held() ||
+                                    lockdep_rtnl_is_held());
 }
 
 static inline int tnode_child_length(const struct tnode *tn)