[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <99737F4847ED0A48AECC9F4A1974A4B80F86E69124@MNEXMB2.qlogic.org>
Date: Wed, 18 Aug 2010 05:47:05 -0500
From: Amit Salecha <amit.salecha@...gic.com>
To: Eric Dumazet <eric.dumazet@...il.com>,
David Miller <davem@...emloft.net>
CC: netdev <netdev@...r.kernel.org>
Subject: RE: [PATCH] qlnic: fix a race in qlcnic_get_stats()
Same fix will be require for netxen_nic.
-----Original Message-----
From: Eric Dumazet [mailto:eric.dumazet@...il.com]
Sent: Wednesday, August 18, 2010 4:13 PM
To: David Miller
Cc: Amit Salecha; netdev
Subject: [PATCH] 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@...il.com>
---
drivers/net/qlcnic/qlcnic_main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index abd7cd6..d71d44a 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -1980,8 +1980,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;
Powered by blists - more mailing lists