]> xenbits.xensource.com Git - people/royger/linux-2.6.18-xen.git/commit
xen/x86: fix for special behavior of first sys_settimeofday(NULL, &tz) invocation
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 18 Jun 2010 13:11:57 +0000 (14:11 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 18 Jun 2010 13:11:57 +0000 (14:11 +0100)
commit51e5deb7089a9d5988ca33b7563eff84c60168e2
treed8490c9f4bae53ff814fd825595ccb14bea950f6
parentc5b8cbb139514e4e911a2f66de2a8146ce8c29fe
xen/x86: fix for special behavior of first sys_settimeofday(NULL, &tz) invocation

The data Xen's time implementation maintains to make do_gettimeofday()
return values monotonic needs to be reset not only during normal
do_gettimeofday() invocations, but also when the clock gets warped
due to the hardware (CMOS) clock running on local (rather than UTC)
time.

Additionally there was a time window in do_gettimeofday() (between
the end of the xtime read loop and the acquiring of the monotonicity
data lock) where, if on another processor do_settimeofday() would
execute to completion, the zeroes written by the latter could get
overwritten by the former with values obtained before the time was
updated. This now gets prevented by maintaining a version for the
monotonicity data.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
arch/i386/kernel/time-xen.c
kernel/time.c