netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] qlnic: fix a race in qlcnic_get_stats()
@ 2010-08-18 10:42 Eric Dumazet
  2010-08-18 10:47 ` Amit Salecha
  2010-08-19  7:44 ` [PATCH] qlnic: fix a race in qlcnic_get_stats() David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Eric Dumazet @ 2010-08-18 10:42 UTC (permalink / raw)
  To: David Miller; +Cc: Amit Kumar Salecha, netdev

Dont clear netdev->stats, it might give transient wrong values to
concurrent stat readers.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.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;



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-08-19  7:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-18 10:42 [PATCH] qlnic: fix a race in qlcnic_get_stats() Eric Dumazet
2010-08-18 10:47 ` Amit Salecha
2010-08-18 12:29   ` [PATCH] netxen: fix a race in netxen_nic_get_stats() Eric Dumazet
2010-08-19  7:44     ` David Miller
2010-08-19  7:44 ` [PATCH] qlnic: fix a race in qlcnic_get_stats() David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).