The patch titled
cond_resched(): fix bogus might_sleep() warning
has been added to the -mm tree. Its filename is
cond_resched-fix-bogus-might_sleep-warning.patch
Patches currently in -mm which might be from [EMAIL PROTECTED] are
detect-soft-lockups.patch
cond_resched-fix-bogus-might_sleep-warning.patch
ingo-nfs-stuff.patch
spinlock-consolidation.patch
spinlock-consolidation-m32r-fix.patch
spinlock-consolidation-up-spinlocks-gcc-29x-fix.patch
kgdb-ga.patch
detect-atomic-counter-underflows.patch
sched-run-sched_normal-tasks-with-real-time-tasks-on-smt-siblings.patch
max_user_rt_prio-and-max_rt_prio-are-wrong.patch
sched-cleanups.patch
sched-task_noninteractive.patch
sched-add-cacheflush-asm.patch
scheduler-cache-hot-autodetect.patch
sched-implement-nice-support-across-physical-cpus-on-smp.patch
sched-change_prio_bias_only_if_queued.patch
sched-account_rt_tasks_in_prio_bias.patch
sched-fix-smt-scheduler-latency-bug.patch
sched-consider-migration-thread-with-smp-nice.patch
timer-initialization-cleanup-define_timer.patch
more-spin_lock_unlocked-define_spinlock-conversions.patch
unexport-idle_cpu.patch
From: Ingo Molnar <[EMAIL PROTECTED]>
The BKS might be reacquired before we have dropped PREEMPT_ACTIVE, which
could trigger a second could trigger a second cond_resched() call. Bug
found by Hirofumi Ogawa.
Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
kernel/sched.c | 7 +++++++
1 files changed, 7 insertions(+)
diff -puN kernel/sched.c~cond_resched-fix-bogus-might_sleep-warning
kernel/sched.c
--- 25/kernel/sched.c~cond_resched-fix-bogus-might_sleep-warning Wed Jul
6 13:46:38 2005
+++ 25-akpm/kernel/sched.c Wed Jul 6 13:46:38 2005
@@ -3877,6 +3877,13 @@ asmlinkage long sys_sched_yield(void)
static inline void __cond_resched(void)
{
+ /*
+ * The BKS might be reacquired before we have dropped
+ * PREEMPT_ACTIVE, which could trigger a second
+ * cond_resched() call.
+ */
+ if (unlikely(preempt_count()))
+ return;
do {
add_preempt_count(PREEMPT_ACTIVE);
schedule();
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html