All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 03/21] vxlan: exit_net cleanup checks added
@ 2017-11-05  9:59 Vasily Averin
  0 siblings, 0 replies; only message in thread
From: Vasily Averin @ 2017-11-05  9:59 UTC (permalink / raw)
  To: netdev

Be sure that sock_list array initialized in net_init hook was return 
to initial state

Signed-off-by: Vasily Averin <vvs@virtuozzo.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..107e2fd 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]),
+			 "net %p exit: vxlan sock_list is not empty\n", net))
+			break;
 }
 
 static struct pernet_operations vxlan_net_ops = {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-05  9:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-05  9:59 [PATCH 03/21] vxlan: exit_net cleanup checks added Vasily Averin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.