WSL2-Linux-Kernel/kernel/time
Phil Chang 0feeaedf39 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-09-04 13:23:28 +02:00
..
Kconfig -----BEGIN PGP SIGNATURE----- 2021-06-29 12:31:16 -07:00
Makefile time: Improve performance of time64_to_tm() 2021-06-24 11:51:59 +02:00
alarmtimer.c alarmtimer: Prevent starvation by small intervals and SIG_IGN 2023-02-22 12:57:11 +01:00
clockevents.c clockevents: Use list_move() instead of list_del()/list_add() 2021-06-22 17:16:46 +02:00
clocksource-wdtest.c clocksource: Scale the watchdog read retries automatically 2024-08-19 05:45:45 +02:00
clocksource.c clocksource: Make watchdog and suspend-timing multiplication overflow safe 2024-09-04 13:23:27 +02:00
hrtimer.c hrtimer: Prevent queuing of hrtimer without a function callback 2024-09-04 13:23:28 +02:00
itimer.c
jiffies.c clocksource: Make clocksource watchdog test safe for slow-HZ systems 2021-08-28 17:01:32 +02:00
namespace.c memcg: enable accounting for new namesapces and struct nsproxy 2021-09-03 09:58:12 -07:00
ntp.c ntp: Safeguard against time_constant overflow 2024-08-19 05:45:45 +02:00
ntp_internal.h
posix-clock.c
posix-cpu-timers.c posix-cpu-timers: Implement the missing timer_wait_running callback 2023-05-11 23:00:16 +09:00
posix-stubs.c timers: Prevent union confusion from unexpected restart_syscall() 2023-03-10 09:39:48 +01:00
posix-timers.c posix-timers: Ensure timer ID search-loop limit is valid 2024-03-01 13:21:55 +01:00
posix-timers.h
sched_clock.c
test_udelay.c time/debug: Fix memory leak with using debugfs_lookup() 2023-03-10 09:39:51 +01:00
tick-broadcast-hrtimer.c
tick-broadcast.c tick/broadcast: Move per CPU pointer access into the atomic section 2024-08-19 05:45:44 +02:00
tick-common.c tick/nohz_full: Don't abuse smp_call_function_single() in tick_setup_device() 2024-07-05 09:14:22 +02:00
tick-internal.h clocksource: Make clocksource watchdog test safe for slow-HZ systems 2021-08-28 17:01:32 +02:00
tick-legacy.c
tick-oneshot.c
tick-sched.c tick/sched: Preserve number of idle sleeps across CPU hotplug events 2024-02-23 08:54:36 +01:00
tick-sched.h tick: Detect and fix jiffies update stall 2023-08-16 18:22:04 +02:00
time.c
time_test.c time: test: Fix incorrect format specifier 2024-03-26 18:21:15 -04:00
timeconst.bc
timeconv.c time: Improve performance of time64_to_tm() 2021-06-24 11:51:59 +02:00
timecounter.c
timekeeping.c timekeeping: Fix bogus clock_was_set() invocation in do_adjtimex() 2024-08-19 05:45:46 +02:00
timekeeping.h
timekeeping_debug.c
timekeeping_internal.h
timer.c timers: Rename del_timer_sync() to timer_delete_sync() 2024-04-10 16:18:33 +02:00
timer_list.c timer_list: Print name of per-cpu wakeup device 2021-05-31 17:04:49 +02:00
vsyscall.c