Re: [PATCH] del_timer() vs. mod_timer() SMP race

From: Andrew Morton
Date: Sun Nov 21 2004 - 21:56:45 EST


Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> --- linux-work.orig/kernel/timer.c 2004-11-22 11:50:59.000000000 +1100
> +++ linux-work/kernel/timer.c 2004-11-22 13:35:38.928448032 +1100
> @@ -308,6 +308,7 @@
> goto repeat;
> }
> list_del(&timer->entry);
> + smp_wmb();

Pretty please, always add a comment when putting an open-coded barrier into
the kernel. Otherwise people cannot tell why it is there.

-
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/