Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Vasily Averin and committed by
David S. Miller
ce2b7db3 0b6f5955

+6
+6
net/core/fib_rules.c
··· 1022 1022 return 0; 1023 1023 } 1024 1024 1025 + static void __net_exit fib_rules_net_exit(struct net *net) 1026 + { 1027 + WARN_ON_ONCE(!list_empty(&net->rules_ops)); 1028 + } 1029 + 1025 1030 static struct pernet_operations fib_rules_net_ops = { 1026 1031 .init = fib_rules_net_init, 1032 + .exit = fib_rules_net_exit, 1027 1033 }; 1028 1034 1029 1035 static int __init fib_rules_init(void)