]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
s390/traps: panic() instead of die() on translation exception
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 18 Feb 2015 13:17:14 +0000 (14:17 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 25 Mar 2015 10:49:38 +0000 (11:49 +0100)
In case of a translation exception the page tables are corrupted. If the
exception handler then calls die() which again calls show_regs()
-> show_code() -> copy_from_user(), the kernel may access the same memory
location again and generates yet another translation exception. Which in turn
will lead to a deadlock on the die_lock spinlock, which the kernel tries to
grab recursively.

Given that the page tables are corrupted anyway, if we see such an exception,
let's simply panic.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/traps.c

index 8be11c22ed175321fdc9004549c5f86c880af5ab..4d96c9f5345538471cea4cd62620439c88a7f867 100644 (file)
@@ -174,7 +174,7 @@ static inline void do_fp_trap(struct pt_regs *regs, int fpc)
 void translation_exception(struct pt_regs *regs)
 {
        /* May never happen. */
-       die(regs, "Translation exception");
+       panic("Translation exception");
 }
 
 void illegal_op(struct pt_regs *regs)