lkml.org 
[lkml]   [2006]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/7] [hrtimers] Fix posix-timer requeue race
Hi,

On Fri, 20 Jan 2006, Thomas Gleixner wrote:

> CPU0 expires a posix-timer and runs the callback function.
> The signal is queued.
> After releasing the posix-timer lock and before returning to
> hrtimer_run_queue CPU0 gets interrupted.
> CPU1 delivers the queued signal and rearms the timer.
> CPU0 comes back to hrtimer_run_queue and sets the timer state to expired.
> The next modification of the timer can result in an oops, because the state
> information is wrong.

Thomas, this is exactly what I meant with overloaded state machines,
enumerated states are very hard to get right with concurrent processes.
Please get rid of the state field and at least use a flag field instead.

bye, Roman
-
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: 2006-01-20 12:39    [from the cache]
©2003-2011 Jasper Spaans