aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorYao Xiwei <xiwei.yao@6wind.com>2015-04-02 11:31:17 -0400
committerSteffen Klassert <steffen.klassert@secunet.com>2015-04-07 01:52:28 -0400
commit092a29a40bab8bb4530bb3e58a0597001cdecdef (patch)
tree0f2fc79d557ce4de947bd5e5ce8447128514ea24 /net/ipv6
parent68c11e98ef6748ddb63865799b12fc45abb3755d (diff)
vti6: fix uninit when using x-netns
When the kernel deleted a vti6 interface, this interface was not removed from the tunnels list. Thus, when the ip6_vti module was removed, this old interface was found and the kernel tried to delete it again. This was leading to a kernel panic. Fixes: 61220ab34948 ("vti6: Enable namespace changing") Signed-off-by: Yao Xiwei <xiwei.yao@6wind.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/ip6_vti.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c
index 5fb9e212eca8..a4ac85052e44 100644
--- a/net/ipv6/ip6_vti.c
+++ b/net/ipv6/ip6_vti.c
@@ -288,8 +288,7 @@ static struct ip6_tnl *vti6_locate(struct net *net, struct __ip6_tnl_parm *p,
288static void vti6_dev_uninit(struct net_device *dev) 288static void vti6_dev_uninit(struct net_device *dev)
289{ 289{
290 struct ip6_tnl *t = netdev_priv(dev); 290 struct ip6_tnl *t = netdev_priv(dev);
291 struct net *net = dev_net(dev); 291 struct vti6_net *ip6n = net_generic(t->net, vti6_net_id);
292 struct vti6_net *ip6n = net_generic(net, vti6_net_id);
293 292
294 if (dev == ip6n->fb_tnl_dev) 293 if (dev == ip6n->fb_tnl_dev)
295 RCU_INIT_POINTER(ip6n->tnls_wc[0], NULL); 294 RCU_INIT_POINTER(ip6n->tnls_wc[0], NULL);