Re: [PATCH 4/7] [hrtimers] Fix posix-timer requeue race
From: Roman Zippel
Date: Fri Jan 20 2006 - 06:35:15 EST
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/