del_timer_sync needed for UP RT systems.
From: George Anzinger
Date: Tue Apr 26 2005 - 18:48:02 EST
In tracking down the failure of a system running the RT patch we have found a
preemption between the time run_timer_list clears its spinlock and the call back
function (in this case in posix-timers.c) gets its spinlock. The bad news is
that it is possible for the timer to be released at this point leaving the call
back code with a pointer to a bogus timer.
This was/is possible, of course, in SMP systems and is why del_timer_sync()
exists. I suspect that del_timer_sync() needs to also do the "right thing" in
UP RT systems.
This means removing the #ifdef CONFIG_SMP at about line 56 of kernel/timer.c
thus setting up base->running_timer in all cases (or at least in SMP and RT
cases) and also the #ifdef CONFIG_SMP around del_timer_sync() and, of course,
the defines that redirect calls to these functions.
Does this make sense?
George Anzinger george@xxxxxxxxxx
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/