timerfd: 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: Anna-Maria Gleixner <anna-maria@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20190730223828.600085866@linutronix.de
This commit is contained in:
Родитель
51ae33092b
Коммит
a125ecc164
|
@ -471,7 +471,11 @@ static int do_timerfd_settime(int ufd, int flags,
|
|||
break;
|
||||
}
|
||||
spin_unlock_irq(&ctx->wqh.lock);
|
||||
cpu_relax();
|
||||
|
||||
if (isalarm(ctx))
|
||||
hrtimer_cancel_wait_running(&ctx->t.alarm.timer);
|
||||
else
|
||||
hrtimer_cancel_wait_running(&ctx->t.tmr);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Загрузка…
Ссылка в новой задаче