From c07990160b13946faf43d716a8902f6f7cf55a5e Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 18 Oct 2004 09:11:02 -0700 Subject: [PATCH] [PATCH] sched: print preempt count Better debugging output when the CPU scheduler detects atomicity errors. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- kernel/sched.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/sched.c b/kernel/sched.c index c223ff02fc526..2e67de4b356a6 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -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(); } } -- 2.53.0