From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 11 May 2010 12:23:29 +1000 From: Anton Blanchard To: benh@kernel.crashing.org, mikey@neuling.org, michael@ellerman.id.au, miltonm@bga.com Subject: [PATCH 1/3] powerpc: kdump: Fix NULL pointer dereference in irq disable code Message-ID: <20100511022329.GE12203@kryten> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , With sparse irqs we have to check if we have a descriptor before dereferencing it. Signed-off-by: Anton Blanchard --- diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c index 6f4613d..5182439 100644 --- a/arch/powerpc/kernel/crash.c +++ b/arch/powerpc/kernel/crash.c @@ -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) + continue; + if (desc->status & IRQ_INPROGRESS) desc->chip->eoi(i);