linux/kernel/time
Zhan Xusheng 5d16467ae5 alarmtimer: Fix argument order in alarm_timer_forward()
alarm_timer_forward() passes arguments to alarm_forward() in the wrong
order:

  alarm_forward(alarm, timr->it_interval, now);

However, alarm_forward() is defined as:

  u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval);

and uses the second argument as the current time:

  delta = ktime_sub(now, alarm->node.expires);

Passing the interval as "now" results in incorrect delta computation,
which can lead to missed expirations or incorrect overrun accounting.

This issue has been present since the introduction of
alarm_timer_forward().

Fix this by swapping the arguments.

Fixes: e7561f1633 ("alarmtimer: Implement forward callback")
Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260323061130.29991-1-zhanxusheng@xiaomi.com
2026-03-24 23:17:14 +01:00
..
Kconfig
Makefile
alarmtimer.c alarmtimer: Fix argument order in alarm_timer_forward() 2026-03-24 23:17:14 +01:00
clockevents.c
clocksource-wdtest.c
clocksource.c
hrtimer.c Updates for the core time subsystem: 2026-02-10 16:41:59 -08:00
itimer.c
jiffies.c time/jiffies: Fix sysctl file error on configurations where USER_HZ < HZ 2026-03-04 13:48:31 +01:00
namespace.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
ntp.c
ntp_internal.h
posix-clock.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
posix-cpu-timers.c
posix-stubs.c
posix-timers.c
posix-timers.h
sched_clock.c
sleep_timeout.c
test_udelay.c
tick-broadcast-hrtimer.c
tick-broadcast.c
tick-common.c
tick-internal.h cpufreq: ondemand: Simplify idle cputime granularity test 2026-01-28 22:24:58 +01:00
tick-legacy.c
tick-oneshot.c
tick-sched.c Updates for the core time subsystem: 2026-02-10 16:41:59 -08:00
tick-sched.h
time.c time/jiffies: Mark jiffies_64_to_clock_t() notrace 2026-03-11 10:33:12 +01:00
time_test.c time/kunit: Document handling of negative years of is_leap() 2026-02-02 12:37:54 +01:00
timeconst.bc
timeconv.c
timecounter.c
timekeeping.c timekeeping: Fix timex status validation for auxiliary clocks 2026-03-04 20:05:37 +01:00
timekeeping.h
timekeeping_debug.c
timekeeping_internal.h
timer.c cpufreq: ondemand: Simplify idle cputime granularity test 2026-01-28 22:24:58 +01:00
timer_list.c
timer_migration.c cgroup: Fixes for v7.0-rc2 2026-03-03 14:25:18 -08:00
timer_migration.h
vsyscall.c