netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3] ip6_gre: do not leak dst on tunnel destroy path
@ 2014-05-06 15:17 Sergey Popovich
  0 siblings, 0 replies; only message in thread
From: Sergey Popovich @ 2014-05-06 15:17 UTC (permalink / raw)
  To: netdev

On IPv6 GRE tunnel device destroy we may leak destination
if it was previously established in xmit path.

This might look like following on console:

  unregister_netdevice: waiting for lo to become free. Usage count = 3

on network namespace destroy path and/or ip6_gre unloaded.

Signed-off-by: Sergey Popovich <popovich_sergei@mail.ru>
---
 net/ipv6/ip6_gre.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 75277b7..14ba77e 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -358,6 +358,7 @@ static void ip6gre_tunnel_uninit(struct net_device *dev)
 	struct ip6gre_net *ign = net_generic(t->net, ip6gre_net_id);
 
 	ip6gre_tunnel_unlink(ign, t);
+	ip6_tnl_dst_reset(t);
 	dev_put(dev);
 }
 
-- 
1.8.3.4

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

only message in thread, other threads:[~2014-05-06 15:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-06 15:17 [PATCH 3/3] ip6_gre: do not leak dst on tunnel destroy path Sergey Popovich

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).