Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipv4: Add lockdep condition to fix for_each_entry()

This commit applies the consolidated list_for_each_entry_rcu() support
for lockdep conditions.

Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>

authored by

Joel Fernandes (Google) and committed by
Paul E. McKenney
7fd69b0b fbab8d67

+2 -1
+2 -1
net/ipv4/fib_frontend.c
··· 124 124 h = id & (FIB_TABLE_HASHSZ - 1); 125 125 126 126 head = &net->ipv4.fib_table_hash[h]; 127 - hlist_for_each_entry_rcu(tb, head, tb_hlist) { 127 + hlist_for_each_entry_rcu(tb, head, tb_hlist, 128 + lockdep_rtnl_is_held()) { 128 129 if (tb->tb_id == id) 129 130 return tb; 130 131 }