]> Pileus Git - ~andy/linux/blobdiff - drivers/net/xen-netfront.c
net: Explicitly initialize u64_stats_sync structures for lockdep
[~andy/linux] / drivers / net / xen-netfront.c
index 36808bf256770a5e02e7674002ed389c7fd8ac19..54223ac6d8a6c05eef589b6478a61b907a4ac3a4 100644 (file)
@@ -1338,6 +1338,12 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev)
        if (np->stats == NULL)
                goto exit;
 
+       for_each_possible_cpu(i) {
+               struct netfront_stats *xen_nf_stats;
+               xen_nf_stats = per_cpu_ptr(np->stats, i);
+               u64_stats_init(&xen_nf_stats->syncp);
+       }
+
        /* Initialise tx_skbs as a free chain containing every entry. */
        np->tx_skb_freelist = 0;
        for (i = 0; i < NET_TX_RING_SIZE; i++) {