[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1337252690-29687-1-git-send-email-jeffrey.t.kirsher@intel.com>
Date: Thu, 17 May 2012 04:04:50 -0700
From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
To: davem@...emloft.net
Cc: Tushar Dave <tushar.n.dave@...el.com>, netdev@...r.kernel.org,
gospo@...hat.com, sassmann@...hat.com, stable@...r.kernel.org,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Subject: [net] e1000: Prevent reset task killing itself.
From: Tushar Dave <tushar.n.dave@...el.com>
Killing reset task while adapter is resetting causes deadlock.
Only kill reset task if adapter is not resetting.
Ref bug #43132 on bugzilla.kernel.org
CC: stable@...r.kernel.org
Signed-off-by: Tushar Dave <tushar.n.dave@...el.com>
Tested-by: Aaron Brown <aaron.f.brown@...el.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
---
@stable - this patch is applicable back to 3.1 kernels
---
drivers/net/ethernet/intel/e1000/e1000_main.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 37caa88..8d8908d 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -493,7 +493,11 @@ out:
static void e1000_down_and_stop(struct e1000_adapter *adapter)
{
set_bit(__E1000_DOWN, &adapter->flags);
- cancel_work_sync(&adapter->reset_task);
+
+ /* Only kill reset task if adapter is not resetting */
+ if (!test_bit(__E1000_RESETTING, &adapter->flags))
+ cancel_work_sync(&adapter->reset_task);
+
cancel_delayed_work_sync(&adapter->watchdog_task);
cancel_delayed_work_sync(&adapter->phy_info_task);
cancel_delayed_work_sync(&adapter->fifo_stall_task);
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists