[PATCH] x86/entry/vdso: fix path to gettimeofday.c

From: vladimir . oltean

Date: Sat Mar 07 2026 - 12:44:25 EST


To get from arch/x86/entry/vdso/common/vclock_gettime.c to
lib/vdso/gettimeofday.c, you need 5 "..", not 4.

Proof:
$ (cd "$(dirname arch/x86/entry/vdso/common/vclock_gettime.c)" && ls ../../../../lib/vdso/gettimeofday.c)
ls: cannot access '../../../../lib/vdso/gettimeofday.c': No such file or directory
$ (cd "$(dirname arch/x86/entry/vdso/common/vclock_gettime.c)" && ls ../../../../../lib/vdso/gettimeofday.c)
../../../../../lib/vdso/gettimeofday.c

I'm blaming the commit below because it moved vclock_gettime.c from
arch/x86/entry/vdso/vclock_gettime.c to
arch/x86/entry/vdso/common/vclock_gettime.c
without updating the relative include path.

This shows up on an x86 allmodconfig build, I don't really know why it
hasn't been reported so far.

The fix, though, is to make the include path a bit more robust. Benefit
from the fact that arch/x86/entry/vdso/common/Makefile.include sets up
"flags-y += -I$(srctree)", and just specify the include path relative to
the kernel root directory. This was done in a few places in the blamed
commit, but here it was missed.

Fixes: 693c819fedcd ("x86/entry/vdso: Refactor the vdso build")
Signed-off-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>
---
arch/x86/entry/vdso/common/vclock_gettime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/entry/vdso/common/vclock_gettime.c b/arch/x86/entry/vdso/common/vclock_gettime.c
index 027b7e88d753..57066f346b3f 100644
--- a/arch/x86/entry/vdso/common/vclock_gettime.c
+++ b/arch/x86/entry/vdso/common/vclock_gettime.c
@@ -13,7 +13,7 @@
#include <linux/types.h>
#include <vdso/gettime.h>

-#include "../../../../lib/vdso/gettimeofday.c"
+#include "lib/vdso/gettimeofday.c"

int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
{
--
2.43.0