From: Ingo Molnar Date: Fri, 23 Jun 2006 09:05:23 +0000 (-0700) Subject: [PATCH] cond_resched() might_sleep() fix X-Git-Tag: v2.6.18-rc1~1081^2~62 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e0a43d8fa953179505869ec28de78550246e795;p=linux-2.6 [PATCH] cond_resched() might_sleep() fix add the __might_sleep() check back to cond_resched(). Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/sched.c b/kernel/sched.c index 87665132ce..5dbc426944 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -4053,6 +4053,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