sst-linux/kernel/time
Phil Chang 12db3188cd hrtimer: Prevent queuing of hrtimer without a function callback
[ Upstream commit 5a830bbce3af16833fe0092dec47b6dd30279825 ]

The hrtimer function callback must not be NULL. It has to be specified by
the call side but it is not validated by the hrtimer code. When a hrtimer
is queued without a function callback, the kernel crashes with a null
pointer dereference when trying to execute the callback in __run_hrtimer().

Introduce a validation before queuing the hrtimer in
hrtimer_start_range_ns().

[anna-maria: Rephrase commit message]

Signed-off-by: Phil Chang <phil.chang@mediatek.com>
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-29 17:30:41 +02:00
..
alarmtimer.c
clockevents.c
clocksource-wdtest.c clocksource: Scale the watchdog read retries automatically 2024-08-14 13:52:57 +02:00
clocksource.c clocksource: Make watchdog and suspend-timing multiplication overflow safe 2024-08-29 17:30:39 +02:00
hrtimer.c hrtimer: Prevent queuing of hrtimer without a function callback 2024-08-29 17:30:41 +02:00
itimer.c
jiffies.c
Kconfig
Makefile
namespace.c
ntp_internal.h
ntp.c ntp: Safeguard against time_constant overflow 2024-08-14 13:52:57 +02:00
posix-clock.c
posix-cpu-timers.c
posix-stubs.c
posix-timers.c posix-timers: Ensure timer ID search-loop limit is valid 2024-08-29 17:30:17 +02:00
posix-timers.h
sched_clock.c
test_udelay.c
tick-broadcast-hrtimer.c
tick-broadcast.c tick/broadcast: Move per CPU pointer access into the atomic section 2024-08-14 13:52:56 +02:00
tick-common.c tick/nohz_full: Don't abuse smp_call_function_single() in tick_setup_device() 2024-06-21 14:35:59 +02:00
tick-internal.h
tick-legacy.c
tick-oneshot.c
tick-sched.c tick/sched: Preserve number of idle sleeps across CPU hotplug events 2024-01-31 16:17:12 -08:00
tick-sched.h
time_test.c time: test: Fix incorrect format specifier 2024-03-26 18:20:29 -04:00
time.c
timeconst.bc
timeconv.c
timecounter.c
timekeeping_debug.c
timekeeping_internal.h
timekeeping.c timekeeping: Fix bogus clock_was_set() invocation in do_adjtimex() 2024-08-14 13:52:58 +02:00
timekeeping.h
timer_list.c
timer.c timers: Rename del_timer() to timer_delete() 2024-05-17 11:56:13 +02:00
vsyscall.c