Skip to content

Commit

Permalink
s390/unwind: correct stack switching during unwind
Browse files Browse the repository at this point in the history
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: 78c98f9 ("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>
  • Loading branch information
Vasily Gorbik authored and Heiko Carstens committed Jun 7, 2019
1 parent 962f0af commit 0ab0d7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/include/asm/stacktrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0ab0d7a

Please sign in to comment.