Commit 51ae3309 authored by Anna-Maria Gleixner's avatar Anna-Maria Gleixner Committed by Thomas Gleixner

alarmtimer: Prepare for PREEMPT_RT

Use the hrtimer_cancel_wait_running() synchronization mechanism to prevent
priority inversion and live locks on PREEMPT_RT.

[ tglx: Split out of combo patch ]
Signed-off-by: default avatarAnna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20190730223828.508744705@linutronix.de
parent 850377a8
...@@ -432,7 +432,7 @@ int alarm_cancel(struct alarm *alarm) ...@@ -432,7 +432,7 @@ int alarm_cancel(struct alarm *alarm)
int ret = alarm_try_to_cancel(alarm); int ret = alarm_try_to_cancel(alarm);
if (ret >= 0) if (ret >= 0)
return ret; return ret;
cpu_relax(); hrtimer_cancel_wait_running(&alarm->timer);
} }
} }
EXPORT_SYMBOL_GPL(alarm_cancel); EXPORT_SYMBOL_GPL(alarm_cancel);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment