Files
kernel_realme_nemo/kernel
Phil Chang ceb48d2491 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>
(cherry picked from commit ccef3adcb84816a30b8e535c8c4fcb167904e7b1)
[Vegard: fix conflicts in context due to missing commit
 138a6b7ae4dedde5513678f57b275eee19c41b6a ("hrtimer: Factor out
 __hrtimer_start_range_ns()").]
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2025-12-24 11:21:29 +00:00
..
2021-12-25 18:05:37 +05:30
2025-12-24 11:20:48 +00:00
2021-12-25 18:05:37 +05:30
2021-12-25 18:05:37 +05:30
2022-08-17 15:18:46 +05:30
2021-12-25 18:05:37 +05:30
2021-12-25 18:05:37 +05:30
2025-09-21 09:20:42 +00:00
2023-12-20 15:32:35 +01:00
2023-10-31 18:44:28 +05:30
2020-01-13 19:40:11 +00:00
2020-04-02 16:34:20 +02:00
2021-12-25 18:05:37 +05:30
2024-03-05 23:06:18 +05:30
2024-03-13 19:48:50 +05:30
2021-02-07 14:47:41 +01:00
2020-01-09 10:17:53 +01:00