提交 6dede75b 编写于 作者: S Sabrina Dubroca 提交者: David S. Miller

fib_trie: call fib_table_flush_external under RTNL

Move rtnl_lock() before the call to fib4_rules_exit so that
fib_table_flush_external is called under RTNL.

Fixes: 104616e7 ("switchdev: don't support custom ip rules, for now")
Signed-off-by: NSabrina Dubroca <sd@queasysnail.net>
Acked-by: NAlexander Duyck <alexander.h.duyck@redhat.com>
Reviewed-by: NJiri Pirko <jiri@resnulli.us>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8a08919f
...@@ -1171,11 +1171,12 @@ static void ip_fib_net_exit(struct net *net) ...@@ -1171,11 +1171,12 @@ static void ip_fib_net_exit(struct net *net)
{ {
unsigned int i; unsigned int i;
rtnl_lock();
#ifdef CONFIG_IP_MULTIPLE_TABLES #ifdef CONFIG_IP_MULTIPLE_TABLES
fib4_rules_exit(net); fib4_rules_exit(net);
#endif #endif
rtnl_lock();
for (i = 0; i < FIB_TABLE_HASHSZ; i++) { for (i = 0; i < FIB_TABLE_HASHSZ; i++) {
struct hlist_head *head = &net->ipv4.fib_table_hash[i]; struct hlist_head *head = &net->ipv4.fib_table_hash[i];
struct hlist_node *tmp; struct hlist_node *tmp;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册