From 2c6221483169ddd4c04797cd7296ed4fe52fcdd7 Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Thu, 18 Oct 2007 03:04:57 -0700 Subject: Fix discrepancy between VDSO based gettimeofday() and sys_gettimeofday(). On platforms that copy sys_tz into the vdso (currently only x86_64, soon to include powerpc), it is possible for the vdso to get out of sync if a user calls (admittedly unusual) settimeofday(NULL, ptr). This patch adds a hook for architectures that set CONFIG_GENERIC_TIME_VSYSCALL to ensure when sys_tz is updated they can also updatee their copy in the vdso. Signed-off-by: Tony Breeds Cc: Andi Kleen Cc: Tony Luck Acked-by: John Stultz Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/clocksource.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux') diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 16ea3374ddd..107787aacb6 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -221,10 +221,15 @@ extern void clocksource_resume(void); #ifdef CONFIG_GENERIC_TIME_VSYSCALL extern void update_vsyscall(struct timespec *ts, struct clocksource *c); +extern void update_vsyscall_tz(void); #else static inline void update_vsyscall(struct timespec *ts, struct clocksource *c) { } + +static inline void update_vsyscall_tz(void) +{ +} #endif #endif /* _LINUX_CLOCKSOURCE_H */ -- cgit v1.2.3