From fd34ef9bc44b87d746b7178e9c4ba51163b46884 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 10 Apr 2012 14:22:39 +0900 Subject: sh: kgdb: Fix up NULL pointer deref by kgdb_nmicallback. kgdb_nmicallback expects valid register state, so just fetch the register state with get_irq_regs() as on other platforms. Signed-off-by: Paul Mundt --- arch/sh/kernel/kgdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/sh/kernel/kgdb.c') diff --git a/arch/sh/kernel/kgdb.c b/arch/sh/kernel/kgdb.c index ba8e763..38b3139 100644 --- a/arch/sh/kernel/kgdb.c +++ b/arch/sh/kernel/kgdb.c @@ -313,7 +313,7 @@ BUILD_TRAP_HANDLER(singlestep) static void kgdb_call_nmi_hook(void *ignored) { - kgdb_nmicallback(raw_smp_processor_id(), NULL); + kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs()); } void kgdb_roundup_cpus(unsigned long flags) -- cgit v1.1