]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] fix cond_resched() fix
authorJim Houston <jim.houston@ccur.com>
Sun, 30 Jul 2006 10:03:39 +0000 (03:03 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 31 Jul 2006 20:28:40 +0000 (13:28 -0700)
commit15f8bec6987d0b05e2f07d8b31471077f49df8c1
tree08771f36c2506e39f9adfc0bb09e4a574ce196dd
parent7cbe57358dbcf7aaf54880b4a4d74cef53e17bbf
[PATCH] fix cond_resched() fix

In cond_resched_lock() it calls __resched_legal() before dropping the spin
lock.  __resched_legal() will always finds the preempt_count non-zero and
will prevent the call to __cond_resched().

The attached patch adds a parameter to __resched_legal() with the expected
preempt_count value.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/sched.c