Skip to content

Commit

Permalink
[PATCH] cond_resched() might_sleep() fix
Browse files Browse the repository at this point in the history
add the __might_sleep() check back to cond_resched().

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Jun 23, 2006
1 parent 6e66726 commit 8e0a43d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8e0a43d

Please sign in to comment.