From: Eric Dumazet <eric.dumazet@gmail.com>
To: Amit Salecha <amit.salecha@qlogic.com>
Cc: David Miller <davem@davemloft.net>, netdev <netdev@vger.kernel.org>
Subject: [PATCH] netxen: fix a race in netxen_nic_get_stats()
Date: Wed, 18 Aug 2010 14:29:30 +0200 [thread overview]
Message-ID: <1282134570.2194.53.camel@edumazet-laptop> (raw)
In-Reply-To: <99737F4847ED0A48AECC9F4A1974A4B80F86E69124@MNEXMB2.qlogic.org>
Le mercredi 18 août 2010 à 05:47 -0500, Amit Salecha a écrit :
> Same fix will be require for netxen_nic.
Indeed, here is netxen part
Thanks
[PATCH] 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>
---
drivers/net/netxen/netxen_nic_main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index fd86e18..cb30df1 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)
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;
next prev parent reply other threads:[~2010-08-18 12:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Eric Dumazet [this message]
2010-08-19 7:44 ` [PATCH] netxen: fix a race in netxen_nic_get_stats() David Miller
2010-08-19 7:44 ` [PATCH] qlnic: fix a race in qlcnic_get_stats() David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1282134570.2194.53.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=amit.salecha@qlogic.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox