s390/unwind: correct stack switching during unwind

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: 78c98f9074 ("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>
This commit is contained in:
Vasily Gorbik 2019-06-06 16:58:45 +02:00 committed by Heiko Carstens
parent 962f0af83c
commit 0ab0d7ac20
1 changed files with 1 additions and 1 deletions

View 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,