lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-51ae33092bb8320497ec75ddc5ab383d8fafd55c@git.kernel.org>
Date:   Thu, 1 Aug 2019 12:06:16 -0700
From:   tip-bot for Anna-Maria Gleixner <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     peterz@...radead.org, mingo@...nel.org, tglx@...utronix.de,
        hpa@...or.com, linux-kernel@...r.kernel.org, bigeasy@...utronix.de,
        anna-maria@...utronix.de
Subject: [tip:timers/core] alarmtimer: Prepare for PREEMPT_RT

Commit-ID:  51ae33092bb8320497ec75ddc5ab383d8fafd55c
Gitweb:     https://git.kernel.org/tip/51ae33092bb8320497ec75ddc5ab383d8fafd55c
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 20:51:23 +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

Powered by Openwall GNU/*/Linux Powered by OpenVZ