]> git.baikalelectronics.ru Git - kernel.git/commit
x86_64: vsyscall time() fix
authorjohn stultz <johnstul@us.ibm.com>
Mon, 21 May 2007 12:31:52 +0000 (14:31 +0200)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 21 May 2007 16:56:57 +0000 (09:56 -0700)
commita56fb5c082f5c036940a4c959331ef4c10f08aba
treec6ee8e8630600029d322569f20602dc586f4fbf5
parenta9e535a0281e25516694d51003eee433cb010aa0
x86_64: vsyscall time() fix

The vsyscall time() function basically returns the second portion of
xtime directly.  This however means that there is about a ticks worth of
time each second where time() will return a second value less then what
gettimeofday() does.

Additionally, this window where vtime() is behind vgettimeofday() grows
when dynticks is enabled, so its probably good to get this in before
dynticks lands.

Big thanks to Sripathi for noticing this issue and creating a test case
to work with!

This patch changes the vtime() implemenation to call vgettimeofday(),
much as syscall time() implementation calls gettimeofday().

2.6.21 stable candidate too

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86_64/kernel/vsyscall.c