]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
s390/unwind: add machine check handler stack
authorVasily Gorbik <gor@linux.ibm.com>
Wed, 31 Mar 2021 09:44:50 +0000 (11:44 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Mon, 5 Apr 2021 09:30:07 +0000 (11:30 +0200)
Fixes: b61b1595124a ("s390: add stack for machine check handler")
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/stacktrace.h
arch/s390/kernel/dumpstack.c

index ee056f4a4fa3061b45df8a97a0d10703c7952aab..2b543163d90a02b2d050e7fc8f578020f9107973 100644 (file)
@@ -12,6 +12,7 @@ enum stack_type {
        STACK_TYPE_IRQ,
        STACK_TYPE_NODAT,
        STACK_TYPE_RESTART,
+       STACK_TYPE_MCCK,
 };
 
 struct stack_info {
index 0dc4b258b98d51c1c80c2a1eefea64c46ea7e1da..db1bc00229caf20f04d8ee8275598536c390f70b 100644 (file)
@@ -79,6 +79,15 @@ static bool in_nodat_stack(unsigned long sp, struct stack_info *info)
        return in_stack(sp, info, STACK_TYPE_NODAT, top - THREAD_SIZE, top);
 }
 
+static bool in_mcck_stack(unsigned long sp, struct stack_info *info)
+{
+       unsigned long frame_size, top;
+
+       frame_size = STACK_FRAME_OVERHEAD + sizeof(struct pt_regs);
+       top = S390_lowcore.mcck_stack + frame_size;
+       return in_stack(sp, info, STACK_TYPE_MCCK, top - THREAD_SIZE, top);
+}
+
 static bool in_restart_stack(unsigned long sp, struct stack_info *info)
 {
        unsigned long frame_size, top;
@@ -108,7 +117,8 @@ int get_stack_info(unsigned long sp, struct task_struct *task,
        /* Check per-cpu stacks */
        if (!in_irq_stack(sp, info) &&
            !in_nodat_stack(sp, info) &&
-           !in_restart_stack(sp, info))
+           !in_restart_stack(sp, info) &&
+           !in_mcck_stack(sp, info))
                goto unknown;
 
 recursion_check: