Skip to content

Commit

Permalink
net: suppress lockdep-RCU false positive in FIB trie.
Browse files Browse the repository at this point in the history
Allow fib_find_node() to be called either under rcu_read_lock()
protection or with RTNL held.

Signed-off-by: Paul E. McKenney <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
paulmck authored and davem330 committed Mar 22, 2010
1 parent af98441 commit 634a4b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/ipv4/fib_trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 634a4b2

Please sign in to comment.