]> Pileus Git - ~andy/linux/blobdiff - net/8021q/vlan_dev.c
net: Explicitly initialize u64_stats_sync structures for lockdep
[~andy/linux] / net / 8021q / vlan_dev.c
index 09bf1c38805b75eee667726628bb1e93e8763a07..4deff3ed1da12e810cd37da1c4d145b30fec2ff0 100644 (file)
@@ -558,7 +558,7 @@ static const struct net_device_ops vlan_netdev_ops;
 static int vlan_dev_init(struct net_device *dev)
 {
        struct net_device *real_dev = vlan_dev_priv(dev)->real_dev;
-       int subclass = 0;
+       int subclass = 0, i;
 
        netif_carrier_off(dev);
 
@@ -612,6 +612,13 @@ static int vlan_dev_init(struct net_device *dev)
        if (!vlan_dev_priv(dev)->vlan_pcpu_stats)
                return -ENOMEM;
 
+       for_each_possible_cpu(i) {
+               struct vlan_pcpu_stats *vlan_stat;
+               vlan_stat = per_cpu_ptr(vlan_dev_priv(dev)->vlan_pcpu_stats, i);
+               u64_stats_init(&vlan_stat->syncp);
+       }
+
+
        return 0;
 }