Re: [patch] "interactivity changes", sched-2.5.64-B2

Linus Torvalds (
Fri, 7 Mar 2003 11:10:21 -0800 (PST)

I already merged and pushed out the core changes in -B2, but now that I'm
looking more closely at it I'm almost certain that it's buggy.

In particular, you do this:

dequeue_task(current, array);
current->prio = effective_prio(current);
enqueue_task(current, array);

without actually holding the rq lock on the array!

Yes, we hold _a_ rq_lock - we hold the rq lock for the array that "p" is
on, but that's necessarily the same as this_rq().

So you can end up with the priority bitmap and the runqueue being
corrupted by another wakeup on another CPU that wakes up something that is
on the runqueue for the current CPU. At which point the machine will be
basically dead (runqueue corruption is not likely to be a survivable

Or am I missing something?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at