Re: 2.6.15-rt1

Steven Rostedt
2006-01-03T18:56:47Z

On Tue, 2006-01-03 at 13:40 -0500, Steven Rostedt wrote:

[...]

> Ingo, I guess we have a problem. There must be a reason not to hold
> the rtc_lock and call the {add,mod,del}_timer functions, but your change
> only makes the race condition less likely to happen, and not prevent it.
> The attached program run on an SMP machine will eventually trigger the
> race.
>
> $ gcc -o rtc_ioctl rtc_ioctl.c -lpthread
> $ while : ; do ./rtc_ioctl ; done

[...]

> Should we create another lock to protect only the {add,mod,del}_timer?
> Like the following patch?

Well, with the patch, the above program has been running for over ten
minutes without the race occurring. Without the patch, the race happens
in about one minute or less.

-- Steve