diff options
Diffstat (limited to 'net/ipv4/ip_tunnel.c')
-rw-r--r-- | net/ipv4/ip_tunnel.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c index 63a6d6d6b875..caf01176a5e4 100644 --- a/net/ipv4/ip_tunnel.c +++ b/net/ipv4/ip_tunnel.c | |||
@@ -976,13 +976,19 @@ int ip_tunnel_init(struct net_device *dev) | |||
976 | { | 976 | { |
977 | struct ip_tunnel *tunnel = netdev_priv(dev); | 977 | struct ip_tunnel *tunnel = netdev_priv(dev); |
978 | struct iphdr *iph = &tunnel->parms.iph; | 978 | struct iphdr *iph = &tunnel->parms.iph; |
979 | int err; | 979 | int i, err; |
980 | 980 | ||
981 | dev->destructor = ip_tunnel_dev_free; | 981 | dev->destructor = ip_tunnel_dev_free; |
982 | dev->tstats = alloc_percpu(struct pcpu_tstats); | 982 | dev->tstats = alloc_percpu(struct pcpu_tstats); |
983 | if (!dev->tstats) | 983 | if (!dev->tstats) |
984 | return -ENOMEM; | 984 | return -ENOMEM; |
985 | 985 | ||
986 | for_each_possible_cpu(i) { | ||
987 | struct pcpu_tstats *ipt_stats; | ||
988 | ipt_stats = per_cpu_ptr(dev->tstats, i); | ||
989 | u64_stats_init(&ipt_stats->syncp); | ||
990 | } | ||
991 | |||
986 | err = gro_cells_init(&tunnel->gro_cells, dev); | 992 | err = gro_cells_init(&tunnel->gro_cells, dev); |
987 | if (err) { | 993 | if (err) { |
988 | free_percpu(dev->tstats); | 994 | free_percpu(dev->tstats); |