aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-08-17 22:29:30 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-19 03:44:03 -0400
commit502820a3161e2f228125977d133dd80eea2932d1 (patch)
treec199c94802b332ba975c9c20a2160335d0865478 /drivers/net/netxen
parent1003201a73daed739747b9a6c2c39c57aad5878b (diff)
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 <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r--drivers/net/netxen/netxen_nic_main.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index fd86e18604e6..cb30df106a2c 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -2032,8 +2032,6 @@ struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev)
2032 struct netxen_adapter *adapter = netdev_priv(netdev); 2032 struct netxen_adapter *adapter = netdev_priv(netdev);
2033 struct net_device_stats *stats = &netdev->stats; 2033 struct net_device_stats *stats = &netdev->stats;
2034 2034
2035 memset(stats, 0, sizeof(*stats));
2036
2037 stats->rx_packets = adapter->stats.rx_pkts + adapter->stats.lro_pkts; 2035 stats->rx_packets = adapter->stats.rx_pkts + adapter->stats.lro_pkts;
2038 stats->tx_packets = adapter->stats.xmitfinished; 2036 stats->tx_packets = adapter->stats.xmitfinished;
2039 stats->rx_bytes = adapter->stats.rxbytes; 2037 stats->rx_bytes = adapter->stats.rxbytes;