Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[linux-2.6-microblaze.git] / drivers / net / veth.c
index b24db7a..2ec2041 100644 (file)
@@ -235,10 +235,18 @@ static int veth_change_mtu(struct net_device *dev, int new_mtu)
 
 static int veth_dev_init(struct net_device *dev)
 {
+       int i;
+
        dev->vstats = alloc_percpu(struct pcpu_vstats);
        if (!dev->vstats)
                return -ENOMEM;
 
+       for_each_possible_cpu(i) {
+               struct pcpu_vstats *veth_stats;
+               veth_stats = per_cpu_ptr(dev->vstats, i);
+               u64_stats_init(&veth_stats->syncp);
+       }
+
        return 0;
 }