Call might_sleep in tasklet_kill
diff mbox series

Message ID 20040508055000.GA31358@gondor.apana.org.au
State New, archived
Headers show
Series
  • Call might_sleep in tasklet_kill
Related show

Commit Message

Herbert Xu May 8, 2004, 5:50 a.m. UTC
Hi:

The following patch calls might_sleep in tasklet_kill.  This would've
helped in tracking down http://bugs.debian.org/234365 where someone
called tasklet_kill with IRQs disabled.

Cheers,

Patch
diff mbox series

Index: kernel/softirq.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/kernel/softirq.c,v
retrieving revision 1.1.1.12
diff -u -r1.1.1.12 softirq.c
--- a/kernel/softirq.c	5 Apr 2004 09:49:43 -0000	1.1.1.12
+++ b/kernel/softirq.c	8 May 2004 05:48:50 -0000
@@ -286,8 +286,7 @@ 
 
 void tasklet_kill(struct tasklet_struct *t)
 {
-	if (in_interrupt())
-		printk("Attempt to kill tasklet from interrupt\n");
+	might_sleep();
 
 	while (test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) {
 		do