summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorVasily Averin <vvs@virtuozzo.com>2017-11-12 22:29:33 +0300
committerDavid S. Miller <davem@davemloft.net>2017-11-14 15:45:53 +0900
commit0b6f59553544f47caa940c01015ac1f1113f046a (patch)
treecc6099d3740bd84f3e1b024fa79e934c10cdfa97 /net/core
parentee21b18b6bdbb17a6e0b26255d2f662baf0d8409 (diff)
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')
-rw-r--r--net/core/fib_notifier.c6
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)