lib/vdso: Update coarse timekeeper unconditionally
authorThomas Gleixner <tglx@linutronix.de>
Tue, 14 Jan 2020 18:52:39 +0000 (19:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Mar 2020 15:43:49 +0000 (16:43 +0100)
commit1fabae5c846f2c14f98f7e96228caa0e871cf922
tree55017158b846b01e972113d1b96f281191aa0dd2
parent91ebef8618bf14eb335c58f4331c1c205e1ed424
lib/vdso: Update coarse timekeeper unconditionally

commit 9f24c540f7f8eb3a981528da9a9a636a5bdf5987 upstream.

The low resolution parts of the VDSO, i.e.:

  clock_gettime(CLOCK_*_COARSE), clock_getres(), time()

can be used even if there is no VDSO capable clocksource.

But if an architecture opts out of the VDSO data update then this
information becomes stale. This affects ARM when there is no architected
timer available. The lack of update causes userspace to use stale data
forever.

Make the update of the low resolution parts unconditional and only skip
the update of the high resolution parts if the architecture requests it.

Fixes: 44f57d788e7d ("timekeeping: Provide a generic update_vsyscall() implementation")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20200114185946.765577901@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/time/vsyscall.c