Re: PATCH: Race in 2.6.0-test2 timer code

From: Ingo Molnar (mingo@elte.hu)
Date: Thu Jul 31 2003 - 01:50:46 EST


On Wed, 30 Jul 2003 linas@austin.ibm.com wrote:

> cpu 1 cpu 2
> -------- ---------
> mod_timer() {
>
> old_base = timer->base;
> if (old_base && ) { /* not taken */
> }
> else
> . spin_lock(&cpu2_base->lock);

this race is not possible on 2.6. You are forgetting:

        spin_lock_irqsave(&timer->lock, flags);

which serializes the full mod_timer() operation. Ok?

        Ingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jul 31 2003 - 22:00:48 EST