lkml.org 
[lkml]   [2003]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: PATCH: Race in 2.6.0-test2 timer code
Ingo Molnar <mingo@elte.hu> wrote:
>
>
> On Tue, 29 Jul 2003, Andrew Morton wrote:
>
> > Andrea says that we need to take the per-timer lock in add_timer() and
> > del_timer(), but I haven't yet got around to working out why.
>
> this makes no sense - in 2.6 (and in 2.4) there's no safe add_timer() /
> del_timer() use without using external SMP synchronization. (There's one
> special timer use variant involving del_timer_sync() that was safe in 2.4
> but is unsafe in 2.6, see below.)
>

Well Andrea did mention a problem with the interval timers. But I am not
aware of the exact details of the race which he found, and I don't
understand why del_timer() and add_timer() would be needing the per-timer
locks.

You need to export __mod_timer to modules btw.

--- 25/kernel/ksyms.c~timer-race-fixes 2003-07-29 23:27:05.000000000 -0700
+++ 25-akpm/kernel/ksyms.c 2003-07-29 23:27:49.000000000 -0700
@@ -405,8 +405,6 @@ EXPORT_SYMBOL(proc_doulongvec_ms_jiffies
EXPORT_SYMBOL(proc_doulongvec_minmax);

/* interrupt handling */
-EXPORT_SYMBOL(add_timer);
-EXPORT_SYMBOL(del_timer);
EXPORT_SYMBOL(request_irq);
EXPORT_SYMBOL(free_irq);

@@ -433,7 +431,10 @@ EXPORT_SYMBOL(probe_irq_off);
#ifdef CONFIG_SMP
EXPORT_SYMBOL(del_timer_sync);
#endif
+EXPORT_SYMBOL(add_timer);
+EXPORT_SYMBOL(del_timer);
EXPORT_SYMBOL(mod_timer);
+EXPORT_SYMBOL(__mod_timer);

#ifdef HAVE_DISABLE_HLT
EXPORT_SYMBOL(disable_hlt);
_

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

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.104 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site