aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_vti.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/ip6_vti.c')
-rw-r--r--net/ipv6/ip6_vti.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c
index a4564b05c47b..7b42d5ef868d 100644
--- a/net/ipv6/ip6_vti.c
+++ b/net/ipv6/ip6_vti.c
@@ -732,12 +732,18 @@ static void vti6_dev_setup(struct net_device *dev)
732static inline int vti6_dev_init_gen(struct net_device *dev) 732static inline int vti6_dev_init_gen(struct net_device *dev)
733{ 733{
734 struct ip6_tnl *t = netdev_priv(dev); 734 struct ip6_tnl *t = netdev_priv(dev);
735 int i;
735 736
736 t->dev = dev; 737 t->dev = dev;
737 t->net = dev_net(dev); 738 t->net = dev_net(dev);
738 dev->tstats = alloc_percpu(struct pcpu_tstats); 739 dev->tstats = alloc_percpu(struct pcpu_tstats);
739 if (!dev->tstats) 740 if (!dev->tstats)
740 return -ENOMEM; 741 return -ENOMEM;
742 for_each_possible_cpu(i) {
743 struct pcpu_tstats *stats;
744 stats = per_cpu_ptr(dev->tstats, i);
745 u64_stats_init(&stats->syncp);
746 }
741 return 0; 747 return 0;
742} 748}
743 749