2.6.27-rc-7: BUG: scheduling while atomic: swapper/0/0x00000102

Previous thread: [GIT PULL] kmemcheck updates (for -tip) by Vegard Nossum on Sunday, September 28, 2008 - 10:03 am. (2 messages)

Next thread: [REQUEST] Clarification from Copyright Holders on FUSE/NDISWRAPPER by jmerkey on Sunday, September 28, 2008 - 10:15 am. (10 messages)
From: Prakash Punnoor
Date: Sunday, September 28, 2008 - 10:45 am

[Empty message]
From: Thomas Gleixner
Date: Thursday, October 2, 2008 - 1:50 am

Won't help. :(

BUG: scheduling while atomic: swapper/0/0x00000102

0x00000102 is the preemption count. That means:

preemption count = 2 and softirq count = 1

So either the stacktrace is lying or something left the preemption
count in a buggy state. There is nothing in the log which helps to
decode this.

Can you please apply the debug patch below and try to reproduce ?

Thanks,

	tglx
---
diff --git a/kernel/softirq.c b/kernel/softirq.c
index c506f26..0fc32b6 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -205,7 +205,18 @@ restart:
 
 	do {
 		if (pending & 1) {
+			int prev_count = preempt_count();
+
 			h->action(h);
+
+			if (prev_count != preempt_count()) {
+				printk(KERN_ERR "huh, entered sotfirq %ld %p"
+				       "with preempt_count %08x,"
+				       " exited with %08x?\n", h - softirq_vec,
+				       h->action, prev_count, preempt_count());
+				preempt_count() = prev_count;
+			}
+
 			rcu_bh_qsctr_inc(cpu);
 		}
 		h++;
--

Previous thread: [GIT PULL] kmemcheck updates (for -tip) by Vegard Nossum on Sunday, September 28, 2008 - 10:03 am. (2 messages)

Next thread: [REQUEST] Clarification from Copyright Holders on FUSE/NDISWRAPPER by jmerkey on Sunday, September 28, 2008 - 10:15 am. (10 messages)