diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-09-20 09:59:22 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-09-20 09:59:22 -0400 |
commit | 9514e2311be97a01e8669c4de78e9fea37489f09 (patch) | |
tree | 74a256ce4ab6a94c904635f47862f8f3e3ec7974 /arch | |
parent | 6981e936aa156c747bb3e6aea414bba673457115 (diff) |
[S390] Kernel stack overflow handling.
Substract the size of the initial stack frame from the correct
register. Otherwise we will end up in a program check loop.
Fix the offset into the save area as well.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/kernel/entry64.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 8b956d1538f5..29bbfbab7332 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -827,7 +827,7 @@ restart_go: | |||
827 | */ | 827 | */ |
828 | stack_overflow: | 828 | stack_overflow: |
829 | lg %r15,__LC_PANIC_STACK # change to panic stack | 829 | lg %r15,__LC_PANIC_STACK # change to panic stack |
830 | aghi %r1,-SP_SIZE | 830 | aghi %r15,-SP_SIZE |
831 | mvc SP_PSW(16,%r15),0(%r12) # move user PSW to stack | 831 | mvc SP_PSW(16,%r15),0(%r12) # move user PSW to stack |
832 | stmg %r0,%r11,SP_R0(%r15) # store gprs %r0-%r11 to kernel stack | 832 | stmg %r0,%r11,SP_R0(%r15) # store gprs %r0-%r11 to kernel stack |
833 | la %r1,__LC_SAVE_AREA | 833 | la %r1,__LC_SAVE_AREA |
@@ -835,7 +835,7 @@ stack_overflow: | |||
835 | je 0f | 835 | je 0f |
836 | chi %r12,__LC_PGM_OLD_PSW | 836 | chi %r12,__LC_PGM_OLD_PSW |
837 | je 0f | 837 | je 0f |
838 | la %r1,__LC_SAVE_AREA+16 | 838 | la %r1,__LC_SAVE_AREA+32 |
839 | 0: mvc SP_R12(32,%r15),0(%r1) # move %r12-%r15 to stack | 839 | 0: mvc SP_R12(32,%r15),0(%r1) # move %r12-%r15 to stack |
840 | xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15) # clear back chain | 840 | xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15) # clear back chain |
841 | la %r2,SP_PTREGS(%r15) # load pt_regs | 841 | la %r2,SP_PTREGS(%r15) # load pt_regs |