diff options
author | Tushar Dave <tushar.n.dave@intel.com> | 2012-05-17 03:04:50 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-18 00:32:41 +0200 |
commit | 8ce6909f77ba1b7bcdea65cc2388fd1742b6d669 (patch) | |
tree | 9eb8589a90009568961ebf1a0c78a29b7df90790 /drivers/net | |
parent | tcp: do_tcp_sendpages() must try to push data out on oom conditions (diff) | |
download | linux-8ce6909f77ba1b7bcdea65cc2388fd1742b6d669.tar.xz linux-8ce6909f77ba1b7bcdea65cc2388fd1742b6d669.zip |
e1000: Prevent reset task killing itself.
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@vger.kernel.org
Signed-off-by: Tushar Dave <tushar.n.dave@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | 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 37caa8885c2a..8d8908d2a9b1 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); |