From: Alexander Duyck Date: Tue, 15 Feb 2011 02:12:05 +0000 (+0000) Subject: ixgbe: balance free_irq calls with request_irq calls X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=894ff7cf0e0cf7596f9b0d3c30e32c87f8df2784;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git ixgbe: balance free_irq calls with request_irq calls We were incorrectly freeing IRQs that we had not requested. This change corrects that by making certain we only free q_vectors that we have requested IRQs for. Signed-off-by: Alexander Duyck Tested-by: Ross Brattain Tested-by: Stephen Ko Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index f0d0c5aad2b..588661ba2b9 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -2597,6 +2597,11 @@ static void ixgbe_free_irq(struct ixgbe_adapter *adapter) i--; for (; i >= 0; i--) { + /* free only the irqs that were actually requested */ + if (!adapter->q_vector[i]->rxr_count && + !adapter->q_vector[i]->txr_count) + continue; + free_irq(adapter->msix_entries[i].vector, adapter->q_vector[i]); }