diff options
author | Mark Rustad <mark.d.rustad@intel.com> | 2016-09-28 15:36:38 -0700 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2016-11-04 17:16:50 -0700 |
commit | 1fa71252778d6fe151438b009416e4ce7bc1c802 (patch) | |
tree | 265168d434c6ad91ed01d1e5704ef36fb1b248e1 | |
parent | 2916500db3075cf2dd7968fe0f140ef4df7c6d31 (diff) | |
download | linux-stable-1fa71252778d6fe151438b009416e4ce7bc1c802.tar.gz linux-stable-1fa71252778d6fe151438b009416e4ce7bc1c802.tar.bz2 linux-stable-1fa71252778d6fe151438b009416e4ce7bc1c802.zip |
ixgbe: Handle previously-freed msix_entries
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>
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 5e1f57c7ee1b..de634f0c2e6d 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -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]; |