Re: [patch] SMP races in the timer code, timer-fix-2.6.0-test7-A0

From: Ingo Molnar
Date: Wed Oct 15 2003 - 13:51:57 EST



On Mon, 13 Oct 2003, Linus Torvalds wrote:

> since the timer may not even _exist_ any more - the act of running the
> timer may well have free'd the timer structure, and you're now zeroing
> memory that may have been re-allocated for something else.

doh, indeed.

i'm happy with the timer->base write ordering fix that addresses the first
race, it fixes the bug that was actually triggered in RL. The other two
races are present too but were present in previous incarnations of the
timer code too. I'll think about them - both rely on racing with timer
expiry itself - which is more likely to trigger these days because the
tick is now 1 msec, and kernel virtualization is more common too, which
can introduce almost arbitrary 'CPU delays' at any point in the kernel.

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