diff options
author | Vasily Averin <vvs@virtuozzo.com> | 2017-11-12 22:29:33 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-14 09:45:53 +0300 |
commit | 0b6f59553544f47caa940c01015ac1f1113f046a (patch) | |
tree | cc6099d3740bd84f3e1b024fa79e934c10cdfa97 /net/core/fib_notifier.c | |
parent | ee21b18b6bdbb17a6e0b26255d2f662baf0d8409 (diff) | |
download | linux-0b6f59553544f47caa940c01015ac1f1113f046a.tar.xz |
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>
Diffstat (limited to 'net/core/fib_notifier.c')
-rw-r--r-- | net/core/fib_notifier.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/core/fib_notifier.c b/net/core/fib_notifier.c index 4fc202dbdfb6..6b8cd494574f 100644 --- a/net/core/fib_notifier.c +++ b/net/core/fib_notifier.c @@ -161,8 +161,14 @@ static int __net_init fib_notifier_net_init(struct net *net) 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 = { .init = fib_notifier_net_init, + .exit = fib_notifier_net_exit, }; static int __init fib_notifier_init(void) |