Skip to content

Commit 03c8b0b

Browse files
committed
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
2 parents 327fcef + 5a830bb commit 03c8b0b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/time/hrtimer.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,6 +1285,8 @@ void hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
12851285
struct hrtimer_clock_base *base;
12861286
unsigned long flags;
12871287

1288+
if (WARN_ON_ONCE(!timer->function))
1289+
return;
12881290
/*
12891291
* Check whether the HRTIMER_MODE_SOFT bit and hrtimer.is_soft
12901292
* match on CONFIG_PREEMPT_RT = n. With PREEMPT_RT check the hard

0 commit comments

Comments
 (0)