diff options
author | Yao Xiwei <xiwei.yao@6wind.com> | 2015-04-02 17:31:17 +0200 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-06-28 13:39:22 -0400 |
commit | 8c8e709d1b1b76b2dcd54b47fe087fd5e622ea3b (patch) | |
tree | eebcb6644d9c9853a015724221532696db7b897b | |
parent | a8371616145ec2798825a1a3053f9b7c07e42064 (diff) |
vti6: fix uninit when using x-netns
[ Upstream commit 092a29a40bab8bb4530bb3e58a0597001cdecdef ]
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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-rw-r--r-- | net/ipv6/ip6_vti.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c index bcda14de7f84..2459b7b0f705 100644 --- a/net/ipv6/ip6_vti.c +++ b/net/ipv6/ip6_vti.c @@ -271,8 +271,7 @@ static struct ip6_tnl *vti6_locate(struct net *net, struct __ip6_tnl_parm *p, static void vti6_dev_uninit(struct net_device *dev) { struct ip6_tnl *t = netdev_priv(dev); - struct net *net = dev_net(dev); - struct vti6_net *ip6n = net_generic(net, vti6_net_id); + struct vti6_net *ip6n = net_generic(t->net, vti6_net_id); if (dev == ip6n->fb_tnl_dev) RCU_INIT_POINTER(ip6n->tnls_wc[0], NULL); |