lkml.org 
[lkml]   [2005]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] Fix sleep_on functions
From
Date


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@mvista.com>

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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.091 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site