History

Merge tag 'timers-urgent-2026-06-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

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

Linus Torvalds committed 5 months ago

Commit 09feffa2 parents 77e8e68 d486b494 files · +11 −7Browse files

Unified · Split

4 files
  1. kernel/time/clockevents.c +1 −1
  2. kernel/time/time.c +1 −1
  3. kernel/time/timer_migration.c +6 −2
  4. lib/vdso/datastore.c +3 −3
kernel/time/clockevents.c+1−1
@@ -301,7 +301,7 @@ static int clockevents_program_min_delta(struct clock_event_device *dev) · 300 unmodified lines
301#include <asm/clock_inlined.h>301#include <asm/clock_inlined.h>
302#else302#else
303static __always_inline void303static __always_inline void
304arch_inlined_clockevent_set_next_coupled(u64 u64 cycles, struct clock_event_device *dev) { }304arch_inlined_clockevent_set_next_coupled(u64 cycles, struct clock_event_device *dev) { }
305#endif305#endif
306 306
307static inline bool clockevent_set_next_coupled(struct clock_event_device *dev, ktime_t expires)307static inline bool clockevent_set_next_coupled(struct clock_event_device *dev, ktime_t expires)
kernel/time/time.c+1−1
@@ -207,7 +207,7 @@ SYSCALL_DEFINE2(settimeofday, struct __kernel_old_timeval __user *, tv, · 206 unmodified lines
207 get_user(new_ts.tv_nsec, &tv->tv_usec))207 get_user(new_ts.tv_nsec, &tv->tv_usec))
208 return -EFAULT;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 return -EINVAL;211 return -EINVAL;
212 212
213 new_ts.tv_nsec *= NSEC_PER_USEC;213 new_ts.tv_nsec *= NSEC_PER_USEC;
kernel/time/timer_migration.c+6−2
@@ -978,8 +978,12 @@ static void tmigr_handle_remote_cpu(unsigned int cpu, u64 now, · 977 unmodified lines
978 /* Drop the lock to allow the remote CPU to exit idle */978 /* Drop the lock to allow the remote CPU to exit idle */
979 raw_spin_unlock_irq(&tmc->lock);979 raw_spin_unlock_irq(&tmc->lock);
980 980
981 if (cpu != smp_processor_id())981 /*
982 timer_expire_remote(cpu);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 * Lock ordering needs to be preserved - timer_base locks before tmigr989 * Lock ordering needs to be preserved - timer_base locks before tmigr
lib/vdso/datastore.c+3−3
@@ -11,21 +11,21 @@ · 10 unmodified lines
11static u8 vdso_initdata[VDSO_NR_PAGES * PAGE_SIZE] __aligned(PAGE_SIZE) __initdata = {};11static u8 vdso_initdata[VDSO_NR_PAGES * PAGE_SIZE] __aligned(PAGE_SIZE) __initdata = {};
12 12
13#ifdef CONFIG_GENERIC_GETTIMEOFDAY13#ifdef CONFIG_GENERIC_GETTIMEOFDAY
14struct vdso_time_data *vdso_k_time_data __refdata =14struct vdso_time_data *vdso_k_time_data __ro_after_init =
15 (void *)&vdso_initdata[VDSO_TIME_PAGE_OFFSET * PAGE_SIZE];15 (void *)&vdso_initdata[VDSO_TIME_PAGE_OFFSET * PAGE_SIZE];
16 16
17static_assert(sizeof(struct vdso_time_data) <= PAGE_SIZE);17static_assert(sizeof(struct vdso_time_data) <= PAGE_SIZE);
18#endif /* CONFIG_GENERIC_GETTIMEOFDAY */18#endif /* CONFIG_GENERIC_GETTIMEOFDAY */
19 19
20#ifdef CONFIG_VDSO_GETRANDOM20#ifdef CONFIG_VDSO_GETRANDOM
21struct vdso_rng_data *vdso_k_rng_data __refdata =21struct vdso_rng_data *vdso_k_rng_data __ro_after_init =
22 (void *)&vdso_initdata[VDSO_RNG_PAGE_OFFSET * PAGE_SIZE];22 (void *)&vdso_initdata[VDSO_RNG_PAGE_OFFSET * PAGE_SIZE];
23 23
24static_assert(sizeof(struct vdso_rng_data) <= PAGE_SIZE);24static_assert(sizeof(struct vdso_rng_data) <= PAGE_SIZE);
25#endif /* CONFIG_VDSO_GETRANDOM */25#endif /* CONFIG_VDSO_GETRANDOM */
26 26
27#ifdef CONFIG_ARCH_HAS_VDSO_ARCH_DATA27#ifdef CONFIG_ARCH_HAS_VDSO_ARCH_DATA
28struct vdso_arch_data *vdso_k_arch_data __refdata =28struct vdso_arch_data *vdso_k_arch_data __ro_after_init =
29 (void *)&vdso_initdata[VDSO_ARCH_PAGES_START * PAGE_SIZE];29 (void *)&vdso_initdata[VDSO_ARCH_PAGES_START * PAGE_SIZE];
30#endif /* CONFIG_ARCH_HAS_VDSO_ARCH_DATA */30#endif /* CONFIG_ARCH_HAS_VDSO_ARCH_DATA */
31 31

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t