netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] ip6_gre: release cached dst on tunnel removal
@ 2015-08-25 14:20 Nicolas Dichtel
  2015-08-25 21:34 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Dichtel @ 2015-08-25 14:20 UTC (permalink / raw)
  To: davem; +Cc: netdev, huaibin Wang, Dmitry Kozlov, Nicolas Dichtel

From: huaibin Wang <huaibin.wang@6wind.com>

When a tunnel is deleted, the cached dst entry should be released.

This problem may prevent the removal of a netns (seen with a x-netns IPv6
gre tunnel):
  unregister_netdevice: waiting for lo to become free. Usage count = 3

CC: Dmitry Kozlov <xeb@mail.ru>
Fixes: c12b395a4664 ("gre: Support GRE over IPv6")
Signed-off-by: huaibin Wang <huaibin.wang@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 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 a38d3ac0f18f..69f4f689f06a 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -361,6 +361,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);
 }
 
-- 
2.4.2

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

* Re: [PATCH net] ip6_gre: release cached dst on tunnel removal
  2015-08-25 14:20 [PATCH net] ip6_gre: release cached dst on tunnel removal Nicolas Dichtel
@ 2015-08-25 21:34 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-08-25 21:34 UTC (permalink / raw)
  To: nicolas.dichtel; +Cc: netdev, huaibin.wang, xeb

From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Tue, 25 Aug 2015 16:20:34 +0200

> From: huaibin Wang <huaibin.wang@6wind.com>
> 
> When a tunnel is deleted, the cached dst entry should be released.
> 
> This problem may prevent the removal of a netns (seen with a x-netns IPv6
> gre tunnel):
>   unregister_netdevice: waiting for lo to become free. Usage count = 3
> 
> CC: Dmitry Kozlov <xeb@mail.ru>
> Fixes: c12b395a4664 ("gre: Support GRE over IPv6")
> Signed-off-by: huaibin Wang <huaibin.wang@6wind.com>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

Applied and queued up for -stable, thanks.

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

end of thread, other threads:[~2015-08-25 21:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-25 14:20 [PATCH net] ip6_gre: release cached dst on tunnel removal Nicolas Dichtel
2015-08-25 21:34 ` 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).