On 2017-02-18 01:15:22 [+0300], Alexander Gerasiov wrote: > Hello folks, Hi, > I met some problem with preempt version of kernel 4.4. > > I have hrtimer which runs callback, it forwards time and returns > HRTIMER_RESTART. Very common scheme. When I stop the routine I call > hrtimer_cancel(). It should wait for callback completion if any and > unqueue any future timers. Could you please check if the hunk here fixes the problem you see? diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -455,7 +455,10 @@ static inline int hrtimer_is_queued(struct hrtimer *timer) */ static inline int hrtimer_callback_running(const struct hrtimer *timer) { - return timer->base->cpu_base->running == timer; + if ((timer->base->cpu_base->running == timer) || + (timer->base->cpu_base->running_soft == timer)) + return 1; + return 0; } /* Forward a hrtimer so it expires after now: */ Sebastian -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html