Commit e1d12d70 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

s390/traps: panic() instead of die() on translation exception

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: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 86cd741b
...@@ -174,7 +174,7 @@ static inline void do_fp_trap(struct pt_regs *regs, int fpc) ...@@ -174,7 +174,7 @@ static inline void do_fp_trap(struct pt_regs *regs, int fpc)
void translation_exception(struct pt_regs *regs) void translation_exception(struct pt_regs *regs)
{ {
/* May never happen. */ /* May never happen. */
die(regs, "Translation exception"); panic("Translation exception");
} }
void illegal_op(struct pt_regs *regs) void illegal_op(struct pt_regs *regs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment