Commit ce2b7db3 authored by Vasily Averin's avatar Vasily Averin Committed by David S. Miller

fib_rules: exit_net cleanup check added

Be sure that rules_ops list initialized in net_init hook was return
to initial state.
Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0b6f5955
...@@ -1022,8 +1022,14 @@ static int __net_init fib_rules_net_init(struct net *net) ...@@ -1022,8 +1022,14 @@ static int __net_init fib_rules_net_init(struct net *net)
return 0; return 0;
} }
static void __net_exit fib_rules_net_exit(struct net *net)
{
WARN_ON_ONCE(!list_empty(&net->rules_ops));
}
static struct pernet_operations fib_rules_net_ops = { static struct pernet_operations fib_rules_net_ops = {
.init = fib_rules_net_init, .init = fib_rules_net_init,
.exit = fib_rules_net_exit,
}; };
static int __init fib_rules_init(void) static int __init fib_rules_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment