[PATCH] Fix sleep_on functions

From: Daniel Walker
Date: Thu Feb 24 2005 - 13:46:02 EST




There is a problem with *_sleep_on() functions when they call schedule() . Interrupts
should be enabled , but they aren't. So a warning message is printed letting everyone
know that your calling schedule() from an invalid context.

Signed-off-by: Daniel Walker <dwalker@xxxxxxxxxx>

Index: linux-2.6.10/kernel/sched.c
===================================================================
--- linux-2.6.10.orig/kernel/sched.c 2005-02-22 21:41:45.000000000 +0000
+++ linux-2.6.10/kernel/sched.c 2005-02-22 21:46:36.000000000 +0000
@@ -3417,7 +3417,7 @@
#define SLEEP_ON_HEAD \
spin_lock_irqsave(&q->lock,flags); \
__add_wait_queue(q, &wait); \
- spin_unlock(&q->lock);
+ spin_unlock_irq(&q->lock);

#define SLEEP_ON_TAIL \
spin_lock_irq(&q->lock); \



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