summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2016-12-02 13:29:22 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-12-07 07:22:13 +0100
commitce4dda3f02aca959bdd18b596513791d77b8b7e1 (patch)
treecb18788600da2e9652f7e207a7ed18cc43a948d2
parentdb7ad63624b370100077aa0a849d54fbeabd432b (diff)
downloadlinux-ce4dda3f02aca959bdd18b596513791d77b8b7e1.tar.gz
linux-ce4dda3f02aca959bdd18b596513791d77b8b7e1.tar.bz2
linux-ce4dda3f02aca959bdd18b596513791d77b8b7e1.zip
s390: fix machine check panic stack switch
For system damage machine checks or machine checks due to invalid PSW fields the system will be stopped. In order to get an oops message out before killing the system the machine check handler branches to .Lmcck_panic, switches to the panic stack and then does the usual machine check handling. The switch to the panic stack is incomplete, the stack pointer in %r15 is replaced, but the pt_regs pointer in %r11 is not. The result is a program check which will kill the system in a slightly different way. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/kernel/entry.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index 161f4e66f67d..1a450d220f56 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -958,7 +958,7 @@ ENTRY(mcck_int_handler)
.Lmcck_panic:
lg %r15,__LC_PANIC_STACK
- aghi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
+ la %r11,STACK_FRAME_OVERHEAD(%r15)
j .Lmcck_skip
#