linux/kernel/time
Frederic Weisbecker e2a71bdea8 timer: Fix wheel index calculation on last level
When an expiration delta falls into the last level of the wheel, that delta
has be compared against the maximum possible delay and reduced to fit in if
necessary.

However instead of comparing the delta against the maximum, the code
compares the actual expiry against the maximum. Then instead of fixing the
delta to fit in, it sets the maximum delta as the expiry value.

This can result in various undesired outcomes, the worst possible one
being a timer expiring 15 days ahead to fire immediately.

Fixes: 500462a9de ("timers: Switch to a non-cascading wheel")
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20200717140551.29076-2-frederic@kernel.org
2020-07-17 21:44:05 +02:00
..
Kconfig
Makefile ns: Introduce Time Namespace 2020-01-14 12:20:48 +01:00
alarmtimer.c alarmtimer: Make alarmtimer_get_rtcdev() a stub when CONFIG_RTC_CLASS=n 2020-01-24 21:03:53 +01:00
clockevents.c
clocksource.c clocksource: Remove obsolete ifdef 2020-06-09 16:36:47 +02:00
hrtimer.c hrtimer: Don't dereference the hrtimer pointer after the callback 2020-04-01 13:20:14 +02:00
itimer.c y2038: rename itimerval to __kernel_old_itimerval 2019-12-18 18:07:33 +01:00
jiffies.c timekeeping: Split jiffies seqlock 2020-03-21 16:00:23 +01:00
namespace.c nsproxy: add struct nsset 2020-05-09 13:57:12 +02:00
ntp.c ntp/y2038: Remove incorrect time_t truncation 2019-11-12 08:13:44 +01:00
ntp_internal.h
posix-clock.c posix-clocks: Rename the clock_get() callback to clock_get_timespec() 2020-01-14 12:20:49 +01:00
posix-cpu-timers.c posix-cpu-timers: Replace __get_task_for_clock with pid_for_clock 2020-04-29 08:14:41 -05:00
posix-stubs.c posix-timers: Make clock_nanosleep() time namespace aware 2020-01-14 12:20:55 +01:00
posix-timers.c posix-timers: Pass lockdep expression to RCU lists 2020-02-17 20:12:19 +01:00
posix-timers.h posix-clocks: Introduce clock_get_ktime() callback 2020-01-14 12:20:51 +01:00
sched_clock.c time/sched_clock: Expire timer in hardirq context 2020-03-19 09:45:08 +01:00
test_udelay.c
tick-broadcast-hrtimer.c tick: broadcast-hrtimer: Fix a race in bc_set_next 2019-09-27 14:45:55 +02:00
tick-broadcast.c
tick-common.c timekeeping: Split jiffies seqlock 2020-03-21 16:00:23 +01:00
tick-internal.h
tick-oneshot.c
tick-sched.c lockdep: Annotate irq_work 2020-03-21 16:00:24 +01:00
tick-sched.h
time.c y2038: remove unused time32 interfaces 2020-02-21 11:22:15 -08:00
timeconst.bc
timeconv.c
timecounter.c
timekeeping.c x86/mce: Address objtools noinstr complaints 2020-06-11 15:15:02 +02:00
timekeeping.h timekeeping: Split jiffies seqlock 2020-03-21 16:00:23 +01:00
timekeeping_debug.c
timekeeping_internal.h
timer.c timer: Fix wheel index calculation on last level 2020-07-17 21:44:05 +02:00
timer_list.c timer_list: Guard procfs specific code 2019-06-23 00:08:52 +02:00
vsyscall.c lib/vdso: Avoid highres update if clocksource is not VDSO capable 2020-02-17 20:12:17 +01:00