ipv4: Add lockdep condition to fix for_each_entry()
authorJoel Fernandes (Google) <joel@joelfernandes.org>
Tue, 16 Jul 2019 22:12:24 +0000 (18:12 -0400)
committerPaul E. McKenney <paulmck@linux.ibm.com>
Fri, 9 Aug 2019 18:01:08 +0000 (11:01 -0700)
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>
net/ipv4/fib_frontend.c

index e8bc939..dde77f7 100644 (file)
@@ -124,7 +124,8 @@ struct fib_table *fib_get_table(struct net *net, u32 id)
        h = id & (FIB_TABLE_HASHSZ - 1);
 
        head = &net->ipv4.fib_table_hash[h];
-       hlist_for_each_entry_rcu(tb, head, tb_hlist) {
+       hlist_for_each_entry_rcu(tb, head, tb_hlist,
+                                lockdep_rtnl_is_held()) {
                if (tb->tb_id == id)
                        return tb;
        }