[PATCH v16 05/21] powerpc: prep stack walkers for THREAD_INFO_IN_TASK

Nicholas Piggin npiggin at gmail.com
Thu Feb 7 15:05:09 AEDT 2019


Michael Ellerman's on February 5, 2019 9:32 pm:
> From: Christophe Leroy <christophe.leroy at c-s.fr>
> 
> [text copied from commit 9bbd4c56b0b6
> ("arm64: prep stack walkers for THREAD_INFO_IN_TASK")]
> 
> When CONFIG_THREAD_INFO_IN_TASK is selected, task stacks may be freed
> before a task is destroyed. To account for this, the stacks are
> refcounted, and when manipulating the stack of another task, it is
> necessary to get/put the stack to ensure it isn't freed and/or re-used
> while we do so.
> 
> This patch reworks the powerpc stack walking code to account for this.
> When CONFIG_THREAD_INFO_IN_TASK is not selected these perform no
> refcounting, and this should only be a structural change that does not
> affect behaviour.
> 
> Acked-by: Mark Rutland <mark.rutland at arm.com>
> Signed-off-by: Christophe Leroy <christophe.leroy at c-s.fr>
> Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>

Seems to do what is advertised and asked for by the CONFIG option. I 
don't see any other code that uses non-current stack.

Acked-by: Nicholas Piggin <npiggin at gmail.com>


More information about the Linuxppc-dev mailing list