From: Paul E. McKenney Date: Mon, 22 Mar 2010 01:01:05 +0000 (-0700) Subject: net: suppress lockdep-RCU false positive in FIB trie. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=634a4b2038a6eba4c211fb906fa2f6ec9a4bbfc7;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index af5d8979286..01ef8ba9025 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;