diff options
author | Vasily Averin <vvs@virtuozzo.com> | 2017-11-12 20:30:01 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-14 07:45:53 +0100 |
commit | ce2b7db38af1ffefa6b04b5113b4d69ad36d38ba (patch) | |
tree | be622f1024f36fa4194515720144ff1550d6f09d /net/core | |
parent | fib_notifier: exit_net cleanup check added (diff) | |
download | linux-ce2b7db38af1ffefa6b04b5113b4d69ad36d38ba.tar.xz linux-ce2b7db38af1ffefa6b04b5113b4d69ad36d38ba.zip |
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: 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_rules.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index fafd0a41e3f7..98e1066c3d55 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c @@ -1022,8 +1022,14 @@ static int __net_init fib_rules_net_init(struct net *net) 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 = { .init = fib_rules_net_init, + .exit = fib_rules_net_exit, }; static int __init fib_rules_init(void) |