Commit c0799016 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] sched: print preempt count

Better debugging output when the CPU scheduler detects atomicity errors.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c80f2dee
......@@ -2491,7 +2491,9 @@ asmlinkage void __sched schedule(void)
*/
if (likely(!(current->state & (TASK_DEAD | TASK_ZOMBIE)))) {
if (unlikely(in_atomic())) {
printk(KERN_ERR "bad: scheduling while atomic!\n");
printk(KERN_ERR "scheduling while atomic: "
"%s/0x%08x/%d\n",
current->comm, preempt_count(), current->pid);
dump_stack();
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment