[PATCH] powerpc/stacktrace: Fix arch_stack_walk_reliable()

Petr Mladek pmladek at suse.com
Fri Sep 22 18:09:07 AEST 2023


On Fri 2023-09-22 09:24:41, Michael Ellerman wrote:
> The changes to copy_thread() made in commit eed7c420aac7 ("powerpc:
> copy_thread differentiate kthreads and user mode threads") inadvertently
> broke arch_stack_walk_reliable() because it has knowledge of the stack
> layout.
> 
> Fix it by changing the condition to match the new logic in
> copy_thread(). The changes make the comments about the stack layout
> incorrect, rather than rephrasing them just refer the reader to
> copy_thread().
> 
> Also the comment about the stack backchain is no longer true, since
> commit edbd0387f324 ("powerpc: copy_thread add a back chain to the
> switch stack frame"), so remove that as well.
> 
> Reported-by: Joe Lawrence <joe.lawrence at redhat.com>
> Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
> Fixes: eed7c420aac7 ("powerpc: copy_thread differentiate kthreads and user mode threads")

The change makes sense to me. Well, I could not test it easily.
Anyway, feel free to use:

Reviewed-by: Petr Mladek <pmladek at suse.com>

Best Regards,
Petr


More information about the Linuxppc-dev mailing list