Message ID | 20241003035333.49261-6-mhklinux@outlook.com (mailing list archive) |
---|---|
State | Accepted |
Commit | c86ab60b92d1f3471a56c8bd0856ca78e705f0f0 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | hyper-v: Don't assume cpu_possible_mask is dense | expand |
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 153b97f8ec0d..f8e2dd6d271d 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -1557,7 +1557,7 @@ static void netvsc_get_ethtool_stats(struct net_device *dev, data[i++] = xdp_tx; } - pcpu_sum = kvmalloc_array(num_possible_cpus(), + pcpu_sum = kvmalloc_array(nr_cpu_ids, sizeof(struct netvsc_ethtool_pcpu_stats), GFP_KERNEL); if (!pcpu_sum)