summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2012-03-01 22:11:09 -0800
committerJohn Stultz <john.stultz@linaro.org>2012-03-15 18:17:53 -0700
commita939e817aa7e199d2fff05a67cb745be32dd5c2d (patch)
treef55d3554476ce03c7fe6731284221a177e896d6b /firmware
parenta078c6d0e6288fad6d83fb6d5edd91ddb7b6ab33 (diff)
downloadlinux-a939e817aa7e199d2fff05a67cb745be32dd5c2d.tar.bz2
time: x86: Fix race switching from vsyscall to non-vsyscall clock
When switching from a vsyscall capable to a non-vsyscall capable clocksource, there was a small race, where the last vsyscall gettimeofday before the switch might return a invalid time value using the new non-vsyscall enabled clocksource values after the switch is complete. This is due to the vsyscall code checking the vclock_mode once outside of the seqcount protected section. After it reads the vclock mode, it doesn't re-check that the sampled clock data that is obtained in the seqcount critical section still matches. The fix is to sample vclock_mode inside the protected section, and as long as it isn't VCLOCK_NONE, return the calculated value. If it has changed and is now VCLOCK_NONE, fall back to the syscall gettime calculation. v2: * Cleanup checks as suggested by tglx * Also fix same issue present in gettimeofday path CC: Andy Lutomirski <luto@amacapital.net> CC: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'firmware')
0 files changed, 0 insertions, 0 deletions