AVR32: nmi_enter() without nmi_exit()

From: Manfred Spraul
Date: Wed Aug 20 2008 - 09:40:24 EST


Hi Haavard,

You are listed as the maintainer for AVR32. If someone else is doing that now, could you forward the mail?

While updating the rcu code, I noticed that do_nmi() for AVR32 is odd:
There is an nmi_enter() call without an nmi_exit().
This can't be correct, it breaks rcu (at least the preempt version) and lockdep.

Attached is a patch, not tested at all.

--
Manfred
diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c
index b835c4c..c39cdfc 100644
--- a/arch/avr32/kernel/traps.c
+++ b/arch/avr32/kernel/traps.c
@@ -120,11 +120,11 @@ asmlinkage void do_nmi(unsigned long ecr, struct pt_regs *regs)
case NOTIFY_BAD:
die("Fatal Non-Maskable Interrupt", regs, SIGINT);
default:
+ printk(KERN_ALERT "Got NMI, but nobody cared. Disabling...\n");
+ nmi_disable();
break;
}
-
- printk(KERN_ALERT "Got NMI, but nobody cared. Disabling...\n");
- nmi_disable();
+ nmi_exit();
}

asmlinkage void do_critical_exception(unsigned long ecr, struct pt_regs *regs)