Avoid mixture of task == NULL and task == current meaning the same
thing and simply always initialize task with current in unwind_start.
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
{
if (regs)
return (unsigned long) kernel_stack_pointer(regs);
- if (!task || task == current)
+ if (task == current)
return current_stack_pointer();
return (unsigned long) task->thread.ksp;
}
struct pt_regs *regs,
unsigned long sp)
{
- sp = sp ? : get_stack_pointer(task, regs);
+ task = task ?: current;
+ sp = sp ?: get_stack_pointer(task, regs);
__unwind_start(state, task, regs, sp);
}
if (!sp)
goto unknown;
- task = task ? : current;
-
/* Check per-task stack */
if (in_task_stack(sp, task, info))
goto recursion_check;
struct unwind_state state;
printk("Call Trace:\n");
- if (!task)
- task = current;
unwind_for_each_frame(&state, task, NULL, (unsigned long) stack)
printk(state.reliable ? " [<%016lx>] %pSR \n" :
"([<%016lx>] %pSR)\n",