diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
index 0ebb281aa1788a6482aa480219aba582eebe5567..6b87268c5c2e8711e16c3066e1661828ddb3f7a9 100644
--- a/arch/x86_64/kernel/traps.c
+++ b/arch/x86_64/kernel/traps.c
@@ -472,6 +472,8 @@ void __kprobes die_nmi(char *str, struct pt_regs *regs)
 		panic("nmi watchdog");
 	printk("console shuts up ...\n");
 	oops_end(flags);
+	nmi_exit();
+	local_irq_enable();
 	do_exit(SIGSEGV);
 }