highres: warn on softirq handling an unsafe callback
PATCH 1/1 highres: warn on softirq handling an unsafe callback
run_hrtimer_queue is called from a softirq context, and should never run a callback that is classified as HRTIMER_CB_IRQSAFE_NO_SOFTIRQ. A bug in unrelated code had managed to trigger that bug, so let's add an explicit warning to this function.
Signed-off-by Andres Salomon <[email protected]>
include/linux/hrtimer.h +0 -0
kernel/hrtimer.c +1 -0
@@ -1130,6 +1130,7 @@ static inline void run_hrtimer_queue(struct hrtimer_cpu_base *cpu_base,if (base->softirq_time.tv64 <= timer->expires.tv64)break ; +WARN_ON_ONCE (timer->cb_mode ==HRTIMER_CB_IRQSAFE_NO_SOFTIRQ );timer_stats_account_hrtimer (timer); fn = timer->function;
Quoted 6 lines · Andres Salomon
run_hrtimer_queueis called from a softirq context, and should never run a callback that is classified asHRTIMER_CB_IRQSAFE_NO_SOFTIRQ. A bug in unrelated code had managed to trigger that bug, so let's add an explicit warning to this function.Signed-off-by Andres Salomon <[email protected]>
thanks.
Acked-by Ingo Molnar <[email protected]>
[suggestion for future submissions: please include the patch body as text, not as a MIME attachment - this makes it easier for upstream maintainers to process such mails.]
Ingo