[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-1f8e8bd8b74c8089a43bc5f1f24e4bf0f855d760@git.kernel.org>
Date: Thu, 1 Aug 2019 09:04:08 -0700
From: tip-bot for Anna-Maria Gleixner <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: bigeasy@...utronix.de, anna-maria@...utronix.de,
linux-kernel@...r.kernel.org, mingo@...nel.org, hpa@...or.com,
peterz@...radead.org, tglx@...utronix.de
Subject: [tip:timers/core] alarmtimer: Prepare for PREEMPT_RT
Commit-ID: 1f8e8bd8b74c8089a43bc5f1f24e4bf0f855d760
Gitweb: https://git.kernel.org/tip/1f8e8bd8b74c8089a43bc5f1f24e4bf0f855d760
Author: Anna-Maria Gleixner <anna-maria@...utronix.de>
AuthorDate: Wed, 31 Jul 2019 00:33:49 +0200
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Thu, 1 Aug 2019 17:46:41 +0200
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: Anna-Maria Gleixner <anna-maria@...utronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Link: https://lkml.kernel.org/r/20190730223828.508744705@linutronix.de
---
kernel/time/alarmtimer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c
index 57518efc3810..36947449dba2 100644
--- a/kernel/time/alarmtimer.c
+++ b/kernel/time/alarmtimer.c
@@ -432,7 +432,7 @@ int alarm_cancel(struct alarm *alarm)
int ret = alarm_try_to_cancel(alarm);
if (ret >= 0)
return ret;
- cpu_relax();
+ hrtimer_cancel_wait_running(&alarm->timer);
}
}
EXPORT_SYMBOL_GPL(alarm_cancel);
Powered by blists - more mailing lists