提交 0b6f5955 编写于 作者: V Vasily Averin 提交者: David S. Miller

fib_notifier: exit_net cleanup check added

Be sure that fib_notifier_ops list initilized in net_init hook was return
to initial state.
Signed-off-by: NVasily Averin <vvs@virtuozzo.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ee21b18b
...@@ -161,8 +161,14 @@ static int __net_init fib_notifier_net_init(struct net *net) ...@@ -161,8 +161,14 @@ static int __net_init fib_notifier_net_init(struct net *net)
return 0; return 0;
} }
static void __net_exit fib_notifier_net_exit(struct net *net)
{
WARN_ON_ONCE(!list_empty(&net->fib_notifier_ops));
}
static struct pernet_operations fib_notifier_net_ops = { static struct pernet_operations fib_notifier_net_ops = {
.init = fib_notifier_net_init, .init = fib_notifier_net_init,
.exit = fib_notifier_net_exit,
}; };
static int __init fib_notifier_init(void) static int __init fib_notifier_init(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册