Skip to contentSkip to conversation

cond-resched-might-sleep-fix.patch

PATCH New Ingo Molnar 1 participant 1 message Apr 18, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cond-resched-might-sleep-fix.patch

From: Ingo Molnar <[email protected]>

add the __might_sleep() check back to cond_resched().

----

 kernel/sched.c |    3 +++
 1 files changed, 3 insertions(+)
kernel/sched.c +3 -0
Index: linux/kernel/sched.c
===================================================================
@@ -4072,6 +4072,9 @@ asmlinkage long sys_sched_yield(void)
 
 static inline void __cond_resched(void)
 {
+#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
+	__might_sleep(__FILE__, __LINE__);
+#endif
 	/*
 	 * The BKS might be reacquired before we have dropped
 	 * PREEMPT_ACTIVE, which could trigger a second