aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/vsyscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/kernel/vsyscall.c')
-rw-r--r--arch/x86_64/kernel/vsyscall.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c
index 51d4c6fa88c8..57660d58d500 100644
--- a/arch/x86_64/kernel/vsyscall.c
+++ b/arch/x86_64/kernel/vsyscall.c
@@ -175,10 +175,13 @@ int __vsyscall(0) vgettimeofday(struct timeval * tv, struct timezone * tz)
175 * unlikely */ 175 * unlikely */
176time_t __vsyscall(1) vtime(time_t *t) 176time_t __vsyscall(1) vtime(time_t *t)
177{ 177{
178 struct timeval tv;
178 time_t result; 179 time_t result;
179 if (unlikely(!__vsyscall_gtod_data.sysctl_enabled)) 180 if (unlikely(!__vsyscall_gtod_data.sysctl_enabled))
180 return time_syscall(t); 181 return time_syscall(t);
181 result = __vsyscall_gtod_data.wall_time_sec; 182
183 vgettimeofday(&tv, 0);
184 result = tv.tv_sec;
182 if (t) 185 if (t)
183 *t = result; 186 *t = result;
184 return result; 187 return result;