Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/um/vdso: Fix prototype of clock_gettime()

The clock_gettime() system call takes a pointer to
'struct __kernel_timespec', not 'struct __kernel_old_timespec'.
Right now this is not an issue as the vDSO never works with the
actual struct but only passes it through to the kernel.

Fix the prototype for consistency with the system call.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20251013-uml-vdso-cleanup-v1-1-a079c7adcc69@weissschuh.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Thomas Weißschuh and committed by
Johannes Berg
019cde8f 6e3fc802

+3 -3
+3 -3
arch/x86/um/vdso/um_vdso.c
··· 14 14 #include <asm/unistd.h> 15 15 16 16 /* workaround for -Wmissing-prototypes warnings */ 17 - int __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts); 17 + int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts); 18 18 int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz); 19 19 __kernel_old_time_t __vdso_time(__kernel_old_time_t *t); 20 20 long __vdso_getcpu(unsigned int *cpu, unsigned int *node, struct getcpu_cache *unused); 21 21 22 - int __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts) 22 + int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts) 23 23 { 24 24 long ret; 25 25 ··· 30 30 31 31 return ret; 32 32 } 33 - int clock_gettime(clockid_t, struct __kernel_old_timespec *) 33 + int clock_gettime(clockid_t, struct __kernel_timespec *) 34 34 __attribute__((weak, alias("__vdso_clock_gettime"))); 35 35 36 36 int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)