]> Pileus Git - ~andy/linux/blobdiff - net/ipv4/ipip.c
ipv4: Remove bogus checks of rt_gateway being zero.
[~andy/linux] / net / ipv4 / ipip.c
index 0b2e7329abdadaafd112e736bc6f19bdb21373f6..87c63b67f8ce8aacf7f359cc0d87579a51cd0739 100644 (file)
@@ -148,7 +148,7 @@ struct pcpu_tstats {
        unsigned long   rx_bytes;
        unsigned long   tx_packets;
        unsigned long   tx_bytes;
-};
+} __attribute__((aligned(4*sizeof(unsigned long))));
 
 static struct net_device_stats *ipip_get_stats(struct net_device *dev)
 {
@@ -231,7 +231,7 @@ static void ipip_tunnel_unlink(struct ipip_net *ipn, struct ip_tunnel *t)
             (iter = rtnl_dereference(*tp)) != NULL;
             tp = &iter->next) {
                if (t == iter) {
-                       RCU_INIT_POINTER(*tp, t->next);
+                       rcu_assign_pointer(*tp, t->next);
                        break;
                }
        }
@@ -241,8 +241,8 @@ static void ipip_tunnel_link(struct ipip_net *ipn, struct ip_tunnel *t)
 {
        struct ip_tunnel __rcu **tp = ipip_bucket(ipn, t);
 
-       RCU_INIT_POINTER(t->next, rtnl_dereference(*tp));
-       RCU_INIT_POINTER(*tp, t);
+       rcu_assign_pointer(t->next, rtnl_dereference(*tp));
+       rcu_assign_pointer(*tp, t);
 }
 
 static struct ip_tunnel * ipip_tunnel_locate(struct net *net,
@@ -454,8 +454,6 @@ static netdev_tx_t ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
                        dev->stats.tx_fifo_errors++;
                        goto tx_error;
                }
-               if ((dst = rt->rt_gateway) == 0)
-                       goto tx_error_icmp;
        }
 
        rt = ip_route_output_ports(dev_net(dev), &fl4, NULL,
@@ -792,7 +790,7 @@ static int __net_init ipip_fb_tunnel_init(struct net_device *dev)
                return -ENOMEM;
 
        dev_hold(dev);
-       RCU_INIT_POINTER(ipn->tunnels_wc[0], tunnel);
+       rcu_assign_pointer(ipn->tunnels_wc[0], tunnel);
        return 0;
 }