From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Flavio Leitner <fleitner@redhat.com>,
netdev@vger.kernel.org, gospo@redhat.com, bphilips@novell.com,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next-2.6 08/24] e1000e: fix stats locking in e1000_watchdog_task
Date: Wed, 13 Apr 2011 18:02:04 -0700 [thread overview]
Message-ID: <1302742940-22141-9-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1302742940-22141-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Flavio Leitner <fleitner@redhat.com>
Just move the unlock down a bit because it unlocks too
early leaving a chance for get_stats64() run in parallel
while it is still accessing the stats.
Signed-off-by: Flavio Leitner <fleitner@redhat.com>
Acked-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/e1000e/netdev.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 8812eb2..8a3145e 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -4339,7 +4339,6 @@ static void e1000_watchdog_task(struct work_struct *work)
link_up:
spin_lock(&adapter->stats64_lock);
e1000e_update_stats(adapter);
- spin_unlock(&adapter->stats64_lock);
mac->tx_packet_delta = adapter->stats.tpt - adapter->tpt_old;
adapter->tpt_old = adapter->stats.tpt;
@@ -4350,6 +4349,7 @@ link_up:
adapter->gorc_old = adapter->stats.gorc;
adapter->gotc = adapter->stats.gotc - adapter->gotc_old;
adapter->gotc_old = adapter->stats.gotc;
+ spin_unlock(&adapter->stats64_lock);
e1000e_update_adaptive(&adapter->hw);
--
1.7.4.2
next prev parent reply other threads:[~2011-04-14 1:02 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-14 1:01 [net-next-2.6 00/26][pull request] Intel Wired LAN Driver Update Jeff Kirsher
2011-04-14 1:01 ` [net-next-2.6 01/24] igb: Add anti-spoofing feature documentation Jeff Kirsher
2011-04-14 1:01 ` [net-next-2.6 02/24] igb: fix typo in igb_validate_nvm_checksum_82580 Jeff Kirsher
2011-04-14 1:01 ` [net-next-2.6 03/24] igb: introduce igb_thermal_sensor_event for sensor checking Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 04/24] e1000: convert to set_phys_id Jeff Kirsher
2011-04-14 1:12 ` Allan, Bruce W
2011-04-14 1:18 ` Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 05/24] e1000e: convert short duration msleep() to usleep_range() Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 06/24] e1000e: PCIe link speed in GT/s, not GB/s Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 07/24] e1000e: convert to new VLAN model Jeff Kirsher
2011-04-14 1:02 ` Jeff Kirsher [this message]
2011-04-14 1:02 ` [net-next-2.6 09/24] e1000e: If ASPM L0s needs to be disabled, do it prior to enabling device Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 10/24] ixgbe: DCB, further cleanups to app configuration Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 11/24] ixgbe: fix return value checks Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 12/24] ixgbe: correct function number for some 82598 parts Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 13/24] ixgbe: fix namespacecheck issue Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 14/24] ixgbe: update version string for Dell CEM use Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 15/24] ixgbe: refactor common start_hw code for 82599 and x540 Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 16/24] ixgbe: move disabling of relaxed ordering in start_hw() Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 17/24] ixgbe: fix 82599 KR downshift coexistence with LESM FW module Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 18/24] ixgbe: cleanup short msleep's (<20ms) to use usleep_range Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 19/24] ixgbe: fix semaphores in eeprom routines for x540 Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 20/24] ixgbe: add support for new HW Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 21/24] ixgbe: explicitly disable 100H for x540 Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 22/24] ixgbe: make device_caps() generic Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 23/24] ixgbe: DCB, misallocated packet buffer size with X540 device Jeff Kirsher
2011-04-14 1:02 ` [net-next-2.6 24/24] ixgbe: DCB, X540 devices do not respond to pause frames Jeff Kirsher
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=1302742940-22141-9-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=bphilips@novell.com \
--cc=davem@davemloft.net \
--cc=fleitner@redhat.com \
--cc=gospo@redhat.com \
--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;
as well as URLs for NNTP newsgroup(s).