mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
netxen: fix a race in netxen_nic_get_stats()
Dont clear netdev->stats, it might give transient wrong values to concurrent stat readers. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
1003201a73
commit
502820a316
1 changed files with 0 additions and 2 deletions
|
|
@ -2032,8 +2032,6 @@ struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev)
|
|||
struct netxen_adapter *adapter = netdev_priv(netdev);
|
||||
struct net_device_stats *stats = &netdev->stats;
|
||||
|
||||
memset(stats, 0, sizeof(*stats));
|
||||
|
||||
stats->rx_packets = adapter->stats.rx_pkts + adapter->stats.lro_pkts;
|
||||
stats->tx_packets = adapter->stats.xmitfinished;
|
||||
stats->rx_bytes = adapter->stats.rxbytes;
|
||||
|
|
|
|||
Loading…
Reference in a new issue