Skip to content

Commit 4eaa0e3

Browse files
Eric Dumazetdavem330
authored andcommitted
fib: suppress lockdep-RCU false positive in FIB trie.
Followup of commit 634a4b2 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>
1 parent 0110d6f commit 4eaa0e3

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
@@ -209,7 +209,9 @@ static inline struct node *tnode_get_child_rcu(struct tnode *tn, unsigned int i)
209209
{
210210
struct node *ret = tnode_get_child(tn, i);
211211

212-
return rcu_dereference(ret);
212+
return rcu_dereference_check(ret,
213+
rcu_read_lock_held() ||
214+
lockdep_rtnl_is_held());
213215
}
214216

215217
static inline int tnode_child_length(const struct tnode *tn)

0 commit comments

Comments
 (0)