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
301301 #include <asm/clock_inlined.h>
302302 #else
303303 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) { }
305305 #endif
306306
307307 static 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
207207 get_user(new_ts.tv_nsec, &tv->tv_usec))
208208 return -EFAULT;
209209
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)
211211 return -EINVAL;
212212
213213 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
978978 /* Drop the lock to allow the remote CPU to exit idle */
979979 raw_spin_unlock_irq(&tmc->lock);
980980
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);
983987
984988 /*
985989 * Lock ordering needs to be preserved - timer_base locks before tmigr
lib/vdso/datastore.c+3−3
@@ -11,21 +11,21 @@ · 10 unmodified lines
1111 static u8 vdso_initdata[VDSO_NR_PAGES * PAGE_SIZE] __aligned(PAGE_SIZE) __initdata = {};
1212
1313 #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 =
1515 (void *)&vdso_initdata[VDSO_TIME_PAGE_OFFSET * PAGE_SIZE];
1616
1717 static_assert(sizeof(struct vdso_time_data) <= PAGE_SIZE);
1818 #endif /* CONFIG_GENERIC_GETTIMEOFDAY */
1919
2020 #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 =
2222 (void *)&vdso_initdata[VDSO_RNG_PAGE_OFFSET * PAGE_SIZE];
2323
2424 static_assert(sizeof(struct vdso_rng_data) <= PAGE_SIZE);
2525 #endif /* CONFIG_VDSO_GETRANDOM */
2626
2727 #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 =
2929 (void *)&vdso_initdata[VDSO_ARCH_PAGES_START * PAGE_SIZE];
3030 #endif /* CONFIG_ARCH_HAS_VDSO_ARCH_DATA */
3131

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