netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 1/2] vxlan: unregister on namespace exit
@ 2013-07-18 15:38 Stephen Hemminger
  2013-07-18 15:40 ` [PATCH net 2/2] vxlan: fix igmp races Stephen Hemminger
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Stephen Hemminger @ 2013-07-18 15:38 UTC (permalink / raw)
  To: David Miller, Pravin Shelar; +Cc: netdev

Fix memory leaks and other badness from VXLAN network namespace
teardown. When network namespace is removed, all the vxlan devices should
be unregistered (not closed).

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>


--- a/drivers/net/vxlan.c	2013-07-17 16:32:10.826955800 -0700
+++ b/drivers/net/vxlan.c	2013-07-17 16:47:35.275690741 -0700
@@ -1878,10 +1878,12 @@ static __net_exit void vxlan_exit_net(st
 {
 	struct vxlan_net *vn = net_generic(net, vxlan_net_id);
 	struct vxlan_dev *vxlan;
+	LIST_HEAD(list);
 
 	rtnl_lock();
-	list_for_each_entry(vxlan, &vn->vxlan_list, next)
-		dev_close(vxlan->dev);
+	list_for_each_entry(vxlan, &vn->vxlan_list, next)
+		unregister_netdevice_queue(vxlan->dev, &list);
+	unregister_netdevice_many(&list);
 	rtnl_unlock();
 }
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-07-18 20:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-18 15:38 [PATCH net 1/2] vxlan: unregister on namespace exit Stephen Hemminger
2013-07-18 15:40 ` [PATCH net 2/2] vxlan: fix igmp races Stephen Hemminger
2013-07-18 20:15   ` David Miller
2013-07-18 16:40 ` [PATCH net 1/2] vxlan: unregister on namespace exit Pravin Shelar
2013-07-18 16:58   ` Stephen Hemminger
2013-07-18 18:28     ` Pravin Shelar
2013-07-18 20:15 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).