Re: PATCH: Race in 2.6.0-test2 timer code

From: Andrea Arcangeli (andrea@suse.de)
Date: Wed Jul 30 2003 - 19:16:36 EST


On Wed, Jul 30, 2003 at 04:54:18PM -0700, Andrew Morton wrote:
> Andrea Arcangeli <andrea@suse.de> wrote:
> >
> > 2.6 will kernel crash like we did in 2.4 only if it calls
> > add_timer_on from timer context (of course with a cpuid != than the
> > smp_processor_id()), that would be fixed by the timer->lock everywhere
> > that we've in 2.4 right now. (but there's no add_timer_on in 2.4
> > anyways)
>
> add_timer_on() was added specifically for slab bringup. If we need extra
> locking to cope with it then the best solution would probably be to rename
> it to add_timer_on_dont_use_this_for_anything_else().

yes. I wasn't actually suggesting to add locking everywhere just for
this. It sounds reasonable to leave it unsafe from timer context.

> But if we are going to rely on timer handlers only ever running on the
> adding CPU for locking purposes then can we please have a big comment
> somewhere describing what's going on? It's very subtle...

agreed, it definitely deserves the big fat comment somewhere ;)

thanks,

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