ixgbe: Handle previously-freed msix_entries
authorMark Rustad <mark.d.rustad@intel.com>
Wed, 28 Sep 2016 22:36:38 +0000 (15:36 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 5 Nov 2016 00:16:50 +0000 (17:16 -0700)
The msix_entries memory can be freed by a previous suspend or
remove, so don't crash on close when it isn't there.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

index 5e1f57c..de634f0 100644 (file)
@@ -3070,6 +3070,9 @@ static void ixgbe_free_irq(struct ixgbe_adapter *adapter)
                return;
        }
 
+       if (!adapter->msix_entries)
+               return;
+
        for (vector = 0; vector < adapter->num_q_vectors; vector++) {
                struct ixgbe_q_vector *q_vector = adapter->q_vector[vector];
                struct msix_entry *entry = &adapter->msix_entries[vector];