BUG_ON() in ksoftirqd is a bit too agressive...
diff mbox series

Message ID 428BD501.5020905@mvista.com
State New, archived
Headers show
Series
  • BUG_ON() in ksoftirqd is a bit too agressive...
Related show

Commit Message

George Anzinger May 18, 2005, 11:51 p.m. UTC
Ksoftirqd is created by init, long after the timer system is up and running.  We 
have hit the BUG_ON(tasklet_... in this code, i.e. tasklets pending at ksoftirqd 
create time.  Since, with the RT option to push all softirq code to a thread, 
any softirqs are defered to this time, it is easy to hit this bug.  Clearly only 
a problem for cpu 0.  Here is a patch:

Comments

tip-bot for Ingo Molnar May 23, 2005, 7:28 a.m. UTC | #1
* George Anzinger <george@mvista.com> wrote:

> Ksoftirqd is created by init, long after the timer system is up and 
> running.  We have hit the BUG_ON(tasklet_... in this code, i.e. 
> tasklets pending at ksoftirqd create time.  Since, with the RT option 
> to push all softirq code to a thread, any softirqs are defered to this 
> time, it is easy to hit this bug.  Clearly only a problem for cpu 0.  
> Here is a patch:

thanks, i've applied this to my -RT tree (will show up in .47-05 and 
later trees).

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

Patch
diff mbox series

Index: linux-2.6.10/kernel/softirq.c
===================================================================
--- linux-2.6.10.orig/kernel/softirq.c
+++ linux-2.6.10/kernel/softirq.c
@@ -514,8 +514,12 @@ 

  	switch (action) {
  	case CPU_UP_PREPARE:
-		BUG_ON(per_cpu(tasklet_vec, hotcpu).list);
-		BUG_ON(per_cpu(tasklet_hi_vec, hotcpu).list);
+		/* We may have tasklets already scheduled on
+		   processor 0, so don't check there. */
+		if (hotcpu != 0) {
+			BUG_ON(per_cpu(tasklet_vec, hotcpu).list);
+			BUG_ON(per_cpu(tasklet_hi_vec, hotcpu).list);
+		}
  		p = kthread_create(ksoftirqd, hcpu, "ksoftirqd/%d", hotcpu);
  		if (IS_ERR(p)) {
  			printk("ksoftirqd for %i failed\n", hotcpu);