mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
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: Vasily Averin <vvs@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ee21b18b6b
commit
0b6f595535
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Reference in a new issue