[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d3d16357-3dd1-879f-5b4d-d5b0d068a4b5@virtuozzo.com>
Date: Sun, 5 Nov 2017 19:49:42 +0300
From: Vasily Averin <vvs@...tuozzo.com>
To: netdev@...r.kernel.org
Subject: [PATCH v2 04/21] netdev: exit_net cleanup check added
Be sure that dev_base_head list initialized in net_init hook was return
to initial state
Signed-off-by: Vasily Averin <vvs@...tuozzo.com>
---
net/core/dev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/core/dev.c b/net/core/dev.c
index 588b473..198f137 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -8562,6 +8562,9 @@ static void __net_exit netdev_exit(struct net *net)
{
kfree(net->dev_name_head);
kfree(net->dev_index_head);
+ if (net != &init_net)
+ WARN(!list_empty(&net->dev_base_head),
+ "%s: dev_base_head is not empty\n", __func__);
}
static struct pernet_operations __net_initdata netdev_net_ops = {
--
2.7.4
Powered by blists - more mailing lists