From ae61e8cd061d6ce9a2e2a13e081e7d936139e01e Mon Sep 17 00:00:00 2001 From: Vasily Averin Date: Sun, 12 Nov 2017 22:32:47 +0300 Subject: phonet: exit_net cleanup check added Be sure that pndevs.list initialized in net_init hook was return to initial state. Signed-off-by: Vasily Averin Signed-off-by: David S. Miller --- net/phonet/pn_dev.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'net/phonet/pn_dev.c') diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c index 2cb4c5dfad6f..77787512fc32 100644 --- a/net/phonet/pn_dev.c +++ b/net/phonet/pn_dev.c @@ -331,7 +331,10 @@ static int __net_init phonet_init_net(struct net *net) static void __net_exit phonet_exit_net(struct net *net) { + struct phonet_net *pnn = phonet_pernet(net); + remove_proc_entry("phonet", net->proc_net); + WARN_ON_ONCE(!list_empty(&pnn->pndevs.list)); } static struct pernet_operations phonet_net_ops = { -- cgit v1.2.3-58-ga151