Re: + sched-use-show_regs-to-improve-__schedule_bug-output.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* [email protected] <[email protected]> wrote:

> The patch titled
>      sched: Use show_regs() to improve __schedule_bug() output
> has been added to the -mm tree.  Its filename is
>      sched-use-show_regs-to-improve-__schedule_bug-output.patch
[...]
>   */
>  static noinline void __schedule_bug(struct task_struct *prev)
>  {
> -	printk(KERN_ERR "BUG: scheduling while atomic: %s/0x%08x/%d\n",
> -		prev->comm, preempt_count(), prev->pid);
> +	struct pt_regs *regs = get_irq_regs();
> +
> +	printk(KERN_ERR "BUG: scheduling while atomic: %s/%d/0x%08x\n",
> +		prev->comm, prev->pid, preempt_count());
> +
>  	debug_show_held_locks(prev);
>  	if (irqs_disabled())
>  		print_irqtrace_events(prev);
> -	dump_stack();
> +
> +	if (regs)
> +		show_regs(regs);
> +	else
> +		dump_stack();

the principle looks good to me, but please implement this a bit 
differently: make show_regs(NULL) fall back to dump_stack() (on all 
architectures) and thus reduce the size of the scheduler (and other code 
i guess).

	Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux