DORMANTno replies

[PATCH 3/3] ip6_gre: do not leak dst on tunnel destroy path

From: Sergey Popovich <hidden>
Date: 2014-05-06 15:17:52
Subsystem: networking [general], networking [ipv4/ipv6], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ahern, Ido Schimmel, Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help