x86/traps: Disable interrupts in exc_aligment_check()
authorThomas Gleixner <tglx@linutronix.de>
Wed, 8 Jul 2020 19:28:05 +0000 (21:28 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 9 Jul 2020 09:18:29 +0000 (11:18 +0200)
exc_alignment_check() fails to disable interrupts before returning to the
entry code.

Fixes: ca4c6a9858c2 ("x86/traps: Make interrupt enable/disable symmetric in C code")
Reported-by: syzbot+0889df9502bc0f112b31@syzkaller.appspotmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Andy Lutomirski <luto@kernel.org>
Link: https://lkml.kernel.org/r/20200708192934.076519438@linutronix.de
arch/x86/kernel/traps.c

index 6ed8cc5fbe8fc12a55af0461095cc569238ceb62..4f3a509e5547bcce2191cbcbaf8fbabd0b7812d6 100644 (file)
@@ -299,6 +299,8 @@ DEFINE_IDTENTRY_ERRORCODE(exc_alignment_check)
 
        do_trap(X86_TRAP_AC, SIGBUS, "alignment check", regs,
                error_code, BUS_ADRALN, NULL);
+
+       local_irq_disable();
 }
 
 #ifdef CONFIG_VMAP_STACK