lkml.org 
[lkml]   [2003]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectPATCH: Race in 2.6.0-test2 timer code

PATCH: Race in 2.6.0-test2 timer code

Hi,

I have been chasing a pointer corruption bug in the timer code, and
found the following race in the mod_timer() routine. I am still
testing to see if this fixes my bug ...

--linas



--- linux-2.6.0-test2/kernel/timer.c.orig 2003-07-27 12:07:34.000000000 -0500
+++ linux-2.6.0-test2/kernel/timer.c 2003-07-29 10:22:13.000000000 -0500
@@ -258,8 +258,13 @@ repeat:
spin_unlock(&old_base->lock);
goto repeat;
}
- } else
+ } else {
spin_lock(&new_base->lock);
+ if (timer->base != old_base) {
+ spin_unlock(&new_base->lock);
+ goto repeat;
+ }
+ }

/*
* Delete the previous timeout (if there was any), and install
-
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.095 / U:3.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site