diff options
Diffstat (limited to 'net/ipv4/ip_gre.c')
-rw-r--r-- | net/ipv4/ip_gre.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 01087e035b7d..70ff77f02eee 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -1325,7 +1325,6 @@ static void ipgre_fb_tunnel_init(struct net_device *dev) | |||
1325 | { | 1325 | { |
1326 | struct ip_tunnel *tunnel = netdev_priv(dev); | 1326 | struct ip_tunnel *tunnel = netdev_priv(dev); |
1327 | struct iphdr *iph = &tunnel->parms.iph; | 1327 | struct iphdr *iph = &tunnel->parms.iph; |
1328 | struct ipgre_net *ign = net_generic(dev_net(dev), ipgre_net_id); | ||
1329 | 1328 | ||
1330 | tunnel->dev = dev; | 1329 | tunnel->dev = dev; |
1331 | strcpy(tunnel->parms.name, dev->name); | 1330 | strcpy(tunnel->parms.name, dev->name); |
@@ -1336,7 +1335,6 @@ static void ipgre_fb_tunnel_init(struct net_device *dev) | |||
1336 | tunnel->hlen = sizeof(struct iphdr) + 4; | 1335 | tunnel->hlen = sizeof(struct iphdr) + 4; |
1337 | 1336 | ||
1338 | dev_hold(dev); | 1337 | dev_hold(dev); |
1339 | rcu_assign_pointer(ign->tunnels_wc[0], tunnel); | ||
1340 | } | 1338 | } |
1341 | 1339 | ||
1342 | 1340 | ||
@@ -1383,10 +1381,12 @@ static int __net_init ipgre_init_net(struct net *net) | |||
1383 | if ((err = register_netdev(ign->fb_tunnel_dev))) | 1381 | if ((err = register_netdev(ign->fb_tunnel_dev))) |
1384 | goto err_reg_dev; | 1382 | goto err_reg_dev; |
1385 | 1383 | ||
1384 | rcu_assign_pointer(ign->tunnels_wc[0], | ||
1385 | netdev_priv(ign->fb_tunnel_dev)); | ||
1386 | return 0; | 1386 | return 0; |
1387 | 1387 | ||
1388 | err_reg_dev: | 1388 | err_reg_dev: |
1389 | free_netdev(ign->fb_tunnel_dev); | 1389 | ipgre_dev_free(ign->fb_tunnel_dev); |
1390 | err_alloc_dev: | 1390 | err_alloc_dev: |
1391 | return err; | 1391 | return err; |
1392 | } | 1392 | } |