Michael Ellerman <m...@ellerman.id.au> writes:
> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> index ce393df243aa..4ffbb677c9f5 100644
> --- a/arch/powerpc/kernel/process.c
> +++ b/arch/powerpc/kernel/process.c
> @@ -2067,6 +2081,9 @@ void show_stack(struct task_struct *tsk, unsigned long 
> *stack)
>       int curr_frame = 0;
>  #endif
>  
> +     if (!try_get_task_stack(tsk))
> +             return;

This needs to be after the NULL check below:

>       sp = (unsigned long) stack;
>       if (tsk == NULL)
>               tsk = current;


Otherwise show_stack(NULL, NULL) blows up :)

I've changed it to:

        if (tsk == NULL)
                tsk = current;

        if (!try_get_task_stack(tsk))
                return;

        sp = (unsigned long) stack;
        if (sp == 0) {
                ...


cheers

Reply via email to