]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
ixgbe: fix crash when injecting AER after failed reset
authorEmil Tantilov <emil.s.tantilov@intel.com>
Fri, 29 Sep 2017 17:55:42 +0000 (10:55 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 9 Oct 2017 17:09:05 +0000 (10:09 -0700)
In case where AER recovery fails the device is left in a down state.
Consecutive AER error injection can lead to a double IRQ free.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

index 5e2686d106dbbd89bd42f6e76708ebc8676944ee..c6f9da7990c77c9c8de7134bd689635eb3579663 100644 (file)
@@ -10861,6 +10861,9 @@ skip_bad_vf_detection:
        if (!test_bit(__IXGBE_SERVICE_INITED, &adapter->state))
                return PCI_ERS_RESULT_DISCONNECT;
 
+       if (!netif_device_present(netdev))
+               return PCI_ERS_RESULT_DISCONNECT;
+
        rtnl_lock();
        netif_device_detach(netdev);