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.

Merge tag 'locking-urgent-2025-07-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking fix from Thomas Gleixner:
"A single fix for the futex selftest code to make 32-bit user space
work correctly on 64-bit kernels.

sys_futex_wait() expects a struct __kernel_timespec for the timeout,
but the selftest uses struct timespec, which is the original 32-bit
non 2038 compliant variant.

Fix it up by converting the callsite supplied timespec to a
__kernel_timespec and hand that into the syscall"

* tag 'locking-urgent-2025-07-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
selftests/futex: Convert 32-bit timespec to 64-bit version for 32-bit compatibility mode

+7 -1
+7 -1
tools/testing/selftests/futex/include/futex2test.h
··· 4 4 * 5 5 * Copyright 2021 Collabora Ltd. 6 6 */ 7 + #include <linux/time_types.h> 7 8 #include <stdint.h> 8 9 9 10 #define u64_to_ptr(x) ((void *)(uintptr_t)(x)) ··· 66 65 static inline int futex_waitv(volatile struct futex_waitv *waiters, unsigned long nr_waiters, 67 66 unsigned long flags, struct timespec *timo, clockid_t clockid) 68 67 { 69 - return syscall(__NR_futex_waitv, waiters, nr_waiters, flags, timo, clockid); 68 + struct __kernel_timespec ts = { 69 + .tv_sec = timo->tv_sec, 70 + .tv_nsec = timo->tv_nsec, 71 + }; 72 + 73 + return syscall(__NR_futex_waitv, waiters, nr_waiters, flags, &ts, clockid); 70 74 } 71 75 72 76 /*