diff options
Diffstat (limited to 'net/ipv4/fib_trie.c')
-rw-r--r-- | net/ipv4/fib_trie.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index af5d89792860..59a838795e3e 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -71,6 +71,7 @@ | |||
71 | #include <linux/netlink.h> | 71 | #include <linux/netlink.h> |
72 | #include <linux/init.h> | 72 | #include <linux/init.h> |
73 | #include <linux/list.h> | 73 | #include <linux/list.h> |
74 | #include <linux/slab.h> | ||
74 | #include <net/net_namespace.h> | 75 | #include <net/net_namespace.h> |
75 | #include <net/ip.h> | 76 | #include <net/ip.h> |
76 | #include <net/protocol.h> | 77 | #include <net/protocol.h> |
@@ -961,7 +962,9 @@ fib_find_node(struct trie *t, u32 key) | |||
961 | struct node *n; | 962 | struct node *n; |
962 | 963 | ||
963 | pos = 0; | 964 | pos = 0; |
964 | n = rcu_dereference(t->trie); | 965 | n = rcu_dereference_check(t->trie, |
966 | rcu_read_lock_held() || | ||
967 | lockdep_rtnl_is_held()); | ||
965 | 968 | ||
966 | while (n != NULL && NODE_TYPE(n) == T_TNODE) { | 969 | while (n != NULL && NODE_TYPE(n) == T_TNODE) { |
967 | tn = (struct tnode *) n; | 970 | tn = (struct tnode *) n; |