]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
s390/unwind: correct stack switching during unwind
authorVasily Gorbik <gor@linux.ibm.com>
Thu, 6 Jun 2019 14:58:45 +0000 (16:58 +0200)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Fri, 7 Jun 2019 13:20:44 +0000 (15:20 +0200)
Adjust conditions in on_stack function. That fixes backchain unwinder
which was unable to read pt_regs at the very bottom of the stack and
hence couldn't follow stacks (e.g. from async stack to a task stack).

Fixes: 78c98f907413 ("s390/unwind: introduce stack unwind API")
Reported-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
arch/s390/include/asm/stacktrace.h

index 49634bfbecdd084daa1e01e05048f577bb1d26f0..0ae4bbf7779c8bed1602d90898a2f30751eba50b 100644 (file)
@@ -30,7 +30,7 @@ static inline bool on_stack(struct stack_info *info,
                return false;
        if (addr + len < addr)
                return false;
-       return addr >= info->begin && addr + len < info->end;
+       return addr >= info->begin && addr + len <= info->end;
 }
 
 static inline unsigned long get_stack_pointer(struct task_struct *task,