Skip to content

Commit 634a4b2

Browse files
paulmckdavem330
authored andcommitted
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> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent af98441 commit 634a4b2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

net/ipv4/fib_trie.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,9 @@ fib_find_node(struct trie *t, u32 key)
961961
struct node *n;
962962

963963
pos = 0;
964-
n = rcu_dereference(t->trie);
964+
n = rcu_dereference_check(t->trie,
965+
rcu_read_lock_held() ||
966+
lockdep_rtnl_is_held());
965967

966968
while (n != NULL && NODE_TYPE(n) == T_TNODE) {
967969
tn = (struct tnode *) n;

0 commit comments

Comments
 (0)