if (regs)
return (unsigned long *)regs->bp;
- if (!task || task == current)
+ if (task == current)
return __builtin_frame_address(0);
return (unsigned long *)((struct inactive_task_frame *)task->thread.sp)->bp;
if (regs)
return (unsigned long *)kernel_stack_pointer(regs);
- if (!task || task == current)
+ if (task == current)
return __builtin_frame_address(0);
return (unsigned long *)task->thread.sp;
{
unsigned long bp = 0;
+ task = task ? : current;
+
/*
* Stack frames below this one aren't interesting. Don't show them
* if we're printing for %current.
*/
- if (!sp && (!task || task == current)) {
+ if (!sp && task == current) {
sp = get_stack_pointer(current, NULL);
bp = (unsigned long)get_frame_pointer(current, NULL);
}
u8 *ip;
pr_emerg("Stack:\n");
- show_stack_log_lvl(NULL, regs, NULL, 0, KERN_EMERG);
+ show_stack_log_lvl(current, regs, NULL, 0, KERN_EMERG);
pr_emerg("Code:");
u8 *ip;
printk(KERN_DEFAULT "Stack:\n");
- show_stack_log_lvl(NULL, regs, NULL, 0, KERN_DEFAULT);
+ show_stack_log_lvl(current, regs, NULL, 0, KERN_DEFAULT);
printk(KERN_DEFAULT "Code: ");