[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <84621c61-0fcc-351b-1b86-904075255469@virtuozzo.com>
Date: Sun, 5 Nov 2017 19:49:34 +0300
From: Vasily Averin <vvs@...tuozzo.com>
To: netdev@...r.kernel.org
Subject: [PATCH v2 03/21] vxlan: exit_net cleanup checks added
Be sure that sock_list array initialized in net_init hook was return
to initial state
Signed-off-by: Vasily Averin <vvs@...tuozzo.com>
---
drivers/net/vxlan.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index d7c49cf..f72c1de 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -3704,6 +3704,7 @@ static void __net_exit vxlan_exit_net(struct net *net)
struct vxlan_net *vn = net_generic(net, vxlan_net_id);
struct vxlan_dev *vxlan, *next;
struct net_device *dev, *aux;
+ unsigned int h;
LIST_HEAD(list);
rtnl_lock();
@@ -3723,6 +3724,11 @@ static void __net_exit vxlan_exit_net(struct net *net)
unregister_netdevice_many(&list);
rtnl_unlock();
+
+ for (h = 0; h < PORT_HASH_SIZE; ++h)
+ if (WARN(!hlist_empty(&vn->sock_list[h]),
+ "%s: sock_list is not empty\n", __func__))
+ break;
}
static struct pernet_operations vxlan_net_ops = {
--
2.7.4
Powered by blists - more mailing lists