Pull timer fixes from Ingo Molnar: - Fix the arch_inlined_clockevent_set_next_coupled() prototype in the !CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST case (Naveen Kumar Chaudhary) - Fix an off-by-1 bug in the sys_settimeofday() usecs validation code (Naveen Kumar Chaudhary) - Mark vdso_k_*_data pointers as __ro_after_init (Thomas Weißschuh) - Fix livelock race in tmigr_handle_remote_up() (Amit Matityahu) * tag 'timers-urgent-2026-06-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timers/migration: Fix livelock in tmigr_handle_remote_up() vdso/datastore: Mark vdso_k_*_data pointers as __ro_after_init time: Fix off-by-one in settimeofday() usec validation clockevents: Fix duplicate type specifier in stub function parameter
Unified · Split
| @@ -301,7 +301,7 @@ static int clockevents_program_min_delta(struct clock_event_device *dev) · 300 unmodified lines | ||
| 301 | 301 | #include <asm/clock_inlined.h> |
| 302 | 302 | #else |
| 303 | 303 | static __always_inline void |
| 304 | −arch_inlined_clockevent_set_next_coupled(u64 u64 cycles, struct clock_event_device *dev) { } | |
| 304 | +arch_inlined_clockevent_set_next_coupled(u64 cycles, struct clock_event_device *dev) { } | |
| 305 | 305 | #endif |
| 306 | 306 | |
| 307 | 307 | static inline bool clockevent_set_next_coupled(struct clock_event_device *dev, ktime_t expires) |
| @@ -207,7 +207,7 @@ SYSCALL_DEFINE2(settimeofday, struct __kernel_old_timeval __user *, tv, · 206 unmodified lines | ||
| 207 | 207 | get_user(new_ts.tv_nsec, &tv->tv_usec)) |
| 208 | 208 | return -EFAULT; |
| 209 | 209 | |
| 210 | − if (new_ts.tv_nsec > USEC_PER_SEC || new_ts.tv_nsec < 0) | |
| 210 | + if (new_ts.tv_nsec >= USEC_PER_SEC || new_ts.tv_nsec < 0) | |
| 211 | 211 | return -EINVAL; |
| 212 | 212 | |
| 213 | 213 | new_ts.tv_nsec *= NSEC_PER_USEC; |
| @@ -978,8 +978,12 @@ static void tmigr_handle_remote_cpu(unsigned int cpu, u64 now, · 977 unmodified lines | ||
| 978 | 978 | /* Drop the lock to allow the remote CPU to exit idle */ |
| 979 | 979 | raw_spin_unlock_irq(&tmc->lock); |
| 980 | 980 | |
| 981 | − if (cpu != smp_processor_id()) | |
| 982 | − timer_expire_remote(cpu); | |
| 981 | + /* | |
| 982 | + * This can't exclude the local CPU because jiffies might have advanced | |
| 983 | + * after the timer softirq invoked run_timer_base(BASE_GLOBAL) and the | |
| 984 | + * point where the jiffies snapshot @jif was taken in tmigr_handle_remote(). | |
| 985 | + */ | |
| 986 | + timer_expire_remote(cpu); | |
| 983 | 987 | |
| 984 | 988 | /* |
| 985 | 989 | * Lock ordering needs to be preserved - timer_base locks before tmigr |
| @@ -11,21 +11,21 @@ · 10 unmodified lines | ||
| 11 | 11 | static u8 vdso_initdata[VDSO_NR_PAGES * PAGE_SIZE] __aligned(PAGE_SIZE) __initdata = {}; |
| 12 | 12 | |
| 13 | 13 | #ifdef CONFIG_GENERIC_GETTIMEOFDAY |
| 14 | −struct vdso_time_data *vdso_k_time_data __refdata = | |
| 14 | +struct vdso_time_data *vdso_k_time_data __ro_after_init = | |
| 15 | 15 | (void *)&vdso_initdata[VDSO_TIME_PAGE_OFFSET * PAGE_SIZE]; |
| 16 | 16 | |
| 17 | 17 | static_assert(sizeof(struct vdso_time_data) <= PAGE_SIZE); |
| 18 | 18 | #endif /* CONFIG_GENERIC_GETTIMEOFDAY */ |
| 19 | 19 | |
| 20 | 20 | #ifdef CONFIG_VDSO_GETRANDOM |
| 21 | −struct vdso_rng_data *vdso_k_rng_data __refdata = | |
| 21 | +struct vdso_rng_data *vdso_k_rng_data __ro_after_init = | |
| 22 | 22 | (void *)&vdso_initdata[VDSO_RNG_PAGE_OFFSET * PAGE_SIZE]; |
| 23 | 23 | |
| 24 | 24 | static_assert(sizeof(struct vdso_rng_data) <= PAGE_SIZE); |
| 25 | 25 | #endif /* CONFIG_VDSO_GETRANDOM */ |
| 26 | 26 | |
| 27 | 27 | #ifdef CONFIG_ARCH_HAS_VDSO_ARCH_DATA |
| 28 | −struct vdso_arch_data *vdso_k_arch_data __refdata = | |
| 28 | +struct vdso_arch_data *vdso_k_arch_data __ro_after_init = | |
| 29 | 29 | (void *)&vdso_initdata[VDSO_ARCH_PAGES_START * PAGE_SIZE]; |
| 30 | 30 | #endif /* CONFIG_ARCH_HAS_VDSO_ARCH_DATA */ |
| 31 | 31 | |