diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-08-18 00:42:48 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-19 00:44:02 -0700 |
commit | 1003201a73daed739747b9a6c2c39c57aad5878b (patch) | |
tree | 424bcc508c3f5fa6c15bb21e7c0a65e5a82eacb8 /drivers/net | |
parent | 79c5f51c639021f7472591239c3867cee4b9ec02 (diff) | |
download | op-kernel-dev-1003201a73daed739747b9a6c2c39c57aad5878b.zip op-kernel-dev-1003201a73daed739747b9a6c2c39c57aad5878b.tar.gz |
qlnic: fix a race in qlcnic_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')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_main.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index bf6d87a..213e365 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c @@ -1983,8 +1983,6 @@ static struct net_device_stats *qlcnic_get_stats(struct net_device *netdev) struct qlcnic_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 + adapter->stats.lrobytes; |