瀏覽代碼

avr32: nmi_enter() without nmi_exit()

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.

[haavard.skinnemoen@atmel.com: fixed another case that returned directly]
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Manfred Spraul 16 年之前
父節點
當前提交
3d431a7427
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      arch/avr32/kernel/traps.c

+ 4 - 4
arch/avr32/kernel/traps.c

@@ -116,15 +116,15 @@ asmlinkage void do_nmi(unsigned long ecr, struct pt_regs *regs)
 	switch (ret) {
 	switch (ret) {
 	case NOTIFY_OK:
 	case NOTIFY_OK:
 	case NOTIFY_STOP:
 	case NOTIFY_STOP:
-		return;
+		break;
 	case NOTIFY_BAD:
 	case NOTIFY_BAD:
 		die("Fatal Non-Maskable Interrupt", regs, SIGINT);
 		die("Fatal Non-Maskable Interrupt", regs, SIGINT);
 	default:
 	default:
+		printk(KERN_ALERT "Got NMI, but nobody cared. Disabling...\n");
+		nmi_disable();
 		break;
 		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)
 asmlinkage void do_critical_exception(unsigned long ecr, struct pt_regs *regs)