Be sure that pndevs.list initialized in net_init hook was return
to initial state.

Signed-off-by: Vasily Averin <v...@virtuozzo.com>
---
 net/phonet/pn_dev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c
index 2cb4c5d..1024851 100644
--- a/net/phonet/pn_dev.c
+++ b/net/phonet/pn_dev.c
@@ -332,6 +332,8 @@ static int __net_init phonet_init_net(struct net *net)
 static void __net_exit phonet_exit_net(struct net *net)
 {
        remove_proc_entry("phonet", net->proc_net);
+       WARN(!list_empty(&pnn->pndevs.list),
+            "net %p exit: phonet pndevs.list is not empty\n", net);
 }
 
 static struct pernet_operations phonet_net_ops = {
-- 
2.7.4

Reply via email to