On starting kdump kernel in arm, arm64 and powerpc, chip->irq_mask() is called for each irq_data to mask interrupts. For MSI irqs, pci_msi_mask_irq() is called even when the irq_data doesn't have a link to msi_desc. This results in a NULL pointer dereference.
This patch fixes the above error by avoiding NULL msi_desc use. Signed-off-by: Hiraku Toyooka <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Richard Zhu <[email protected]> Cc: Lucas Stach <[email protected]> Cc: Jingoo Han <[email protected]> Cc: Joao Pinto <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Russell King <[email protected]> Cc: Will Deacon <[email protected]> --- drivers/pci/msi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index e066071..a6ee274 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -227,6 +227,9 @@ static void msi_set_mask_bit(struct irq_data *data, u32 flag) { struct msi_desc *desc = irq_data_get_msi_desc(data); + if (!desc) + return; + if (desc->msi_attrib.is_msix) { msix_mask_irq(desc, flag); readl(desc->mask_base); /* Flush write to device */ -- 2.7.4

