diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-06-30 18:31:08 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-06-30 18:31:08 +0300 |
commit | 03c8b0bd46bcdce3b221fc9f87418c76fd36b28e (patch) | |
tree | 593fb22056c2cf07c2f6311a89da5705eaa3bd2d | |
parent | 327fceff3b634e6f21bbe60bd1d28e41d5b1d924 (diff) | |
parent | 5a830bbce3af16833fe0092dec47b6dd30279825 (diff) | |
download | linux-03c8b0bd46bcdce3b221fc9f87418c76fd36b28e.tar.xz |
Merge tag 'timers_urgent_for_v6.10_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fix from Borislav Petkov:
- Warn when an hrtimer doesn't get a callback supplied
* tag 'timers_urgent_for_v6.10_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
hrtimer: Prevent queuing of hrtimer without a function callback
-rw-r--r-- | kernel/time/hrtimer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 492c14aac642..b8ee320208d4 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -1285,6 +1285,8 @@ void hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, struct hrtimer_clock_base *base; unsigned long flags; + if (WARN_ON_ONCE(!timer->function)) + return; /* * Check whether the HRTIMER_MODE_SOFT bit and hrtimer.is_soft * match on CONFIG_PREEMPT_RT = n. With PREEMPT_RT check the hard |