[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <289a689d-6de9-1c80-fa67-f1a6d22b9f87@virtuozzo.com>
Date: Sun, 5 Nov 2017 19:51:57 +0300
From: Vasily Averin <vvs@...tuozzo.com>
To: netdev@...r.kernel.org
Cc: Remi Denis-Courmont <courmisch@...il.com>
Subject: [PATCH v2 20/21] 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 <vvs@...tuozzo.com>
---
net/phonet/pn_dev.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c
index 2cb4c5d..81b4eb0 100644
--- a/net/phonet/pn_dev.c
+++ b/net/phonet/pn_dev.c
@@ -331,7 +331,11 @@ 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(!list_empty(&pnn->pndevs.list),
+ "%s: pndevs.list is not empty\n", __func__);
}
static struct pernet_operations phonet_net_ops = {
--
2.7.4
Powered by blists - more mailing lists