[Intel-wired-lan] [PATCH v3] ixgbe/ixgbevf: Free IRQ when PCI error recovery removes the device

Alexander Duyck alexander.duyck at gmail.com
Wed May 2 20:30:24 UTC 2018


On Wed, May 2, 2018 at 1:26 PM, Mauro S. M. Rodrigues
<maurosr at linux.vnet.ibm.com> wrote:
> Since commit f7f37e7ff2b9 ("ixgbe: handle close/suspend race with
> netif_device_detach/present") ixgbe_close_suspend is called, from
> ixgbe_close, only if the device is present, i.e. if it isn't detached.
> That exposed a situation where IRQs weren't freed if a PCI error
> recovery system opts to remove the device. For such case the pci channel
> state is set to pci_channel_io_perm_failure and ixgbe_io_error_detected
> was returning PCI_ERS_RESULT_DISCONNECT before calling
> ixgbe_close_suspend consequentially not freeing IRQ and crashing when
> the remove handler calls pci_disable_device, hitting a BUG_ON at
> free_msi_irqs, which asserts that there is no non-free IRQ associated
> with the device to be removed:
>
> BUG_ON(irq_has_action(entry->irq + i));
>
> The issue is fixed by calling the ixgbe_close_suspend before evaluate
> the pci channel state.
>
> Reported-by: Naresh Bannoth <nbannoth at in.ibm.com>
> Reported-by: Abdul Haleem <abdhalee at in.ibm.com>
> Signed-off-by: Mauro S. M. Rodrigues <maurosr at linux.vnet.ibm.com>

This fix looks good to me.

Reviewed-by: Alexander Duyck <alexander.h.duyck at intel.com>


More information about the Intel-wired-lan mailing list