aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e
diff options
context:
space:
mode:
authorFlavio Leitner <fleitner@redhat.com>2011-04-05 00:27:43 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-04-13 22:18:57 -0400
commit2084b114e3fb0d84e5882f5ee6c7039be52da715 (patch)
tree45ac55b9cd72f72493f5c69c43996c3ea45e7b6a /drivers/net/e1000e
parent86d70e532c352bd309dab5f1d18d113f441cb3ae (diff)
e1000e: fix stats locking in e1000_watchdog_task
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>
Diffstat (limited to 'drivers/net/e1000e')
-rw-r--r--drivers/net/e1000e/netdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 8812eb28e099..8a3145e9aa3e 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)
4339link_up: 4339link_up:
4340 spin_lock(&adapter->stats64_lock); 4340 spin_lock(&adapter->stats64_lock);
4341 e1000e_update_stats(adapter); 4341 e1000e_update_stats(adapter);
4342 spin_unlock(&adapter->stats64_lock);
4343 4342
4344 mac->tx_packet_delta = adapter->stats.tpt - adapter->tpt_old; 4343 mac->tx_packet_delta = adapter->stats.tpt - adapter->tpt_old;
4345 adapter->tpt_old = adapter->stats.tpt; 4344 adapter->tpt_old = adapter->stats.tpt;
@@ -4350,6 +4349,7 @@ link_up:
4350 adapter->gorc_old = adapter->stats.gorc; 4349 adapter->gorc_old = adapter->stats.gorc;
4351 adapter->gotc = adapter->stats.gotc - adapter->gotc_old; 4350 adapter->gotc = adapter->stats.gotc - adapter->gotc_old;
4352 adapter->gotc_old = adapter->stats.gotc; 4351 adapter->gotc_old = adapter->stats.gotc;
4352 spin_unlock(&adapter->stats64_lock);
4353 4353
4354 e1000e_update_adaptive(&adapter->hw); 4354 e1000e_update_adaptive(&adapter->hw);
4355 4355