powerpc/crashdump: Do not fail on NULL pointer dereferencing
authorMaxim Uvarov <muvarov@gmail.com>
Tue, 11 May 2010 05:41:08 +0000 (05:41 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 21 May 2010 07:31:09 +0000 (17:31 +1000)
Signed-off-by: Maxim Uvarov <muvarov@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/crash.c

index 6f4613dd05ef05294e10f8cab83e243094f7f731..341d8af6f33e8705a40563b68cc0572d3dca5f6e 100644 (file)
@@ -375,6 +375,9 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
        for_each_irq(i) {
                struct irq_desc *desc = irq_to_desc(i);
 
+               if (!desc || !desc->chip || !desc->chip->eoi)
+                       continue;
+
                if (desc->status & IRQ_INPROGRESS)
                        desc->chip->eoi(i);