[Intel-wired-lan] [PATCH net] ixgbe: fix possible deadlock in ixgbe_service_task()

Taehee Yoo ap420073 at gmail.com
Mon Jul 15 04:57:06 UTC 2019


ixgbe_service_task() calls unregister_netdev() under rtnl_lock().
But unregister_netdev() internally calls rtnl_lock().
So deadlock would occur.

Fixes: 59dd45d550c5 ("ixgbe: firmware recovery mode")
Signed-off-by: Taehee Yoo <ap420073 at gmail.com>
---
I did only compile test because I don't have the hardware.
Could anyone test this patch?
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 57fd9ee6de66..b4888be94dfb 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7894,9 +7894,7 @@ static void ixgbe_service_task(struct work_struct *work)
 	}
 	if (ixgbe_check_fw_error(adapter)) {
 		if (!test_bit(__IXGBE_DOWN, &adapter->state)) {
-			rtnl_lock();
 			unregister_netdev(adapter->netdev);
-			rtnl_unlock();
 		}
 		ixgbe_service_event_complete(adapter);
 		return;
-- 
2.17.1



More information about the Intel-wired-lan mailing list