linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RT 1/3] alarmtimer: Prevent live lock in alarm_cancel()
@ 2018-03-28 10:07 Sebastian Andrzej Siewior
  2018-03-28 10:07 ` [PATCH RT 2/3] posix-timers: user proper timer while waiting for alarmtimer Sebastian Andrzej Siewior
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Sebastian Andrzej Siewior @ 2018-03-28 10:07 UTC (permalink / raw)
  To: linux-rt-users
  Cc: linux-kernel, Thomas Gleixner, Steven Rostedt,
	Sebastian Andrzej Siewior, stable-rt

If alarm_try_to_cancel() requires a retry, then depending on the
priority setting the retry loop might prevent timer callback completion
on RT. Prevent that by waiting for completion on RT, no change for a
non RT kernel.

Cc: stable-rt@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@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 ec09ce9a6012..ede5ef787865 100644
--- a/kernel/time/alarmtimer.c
+++ b/kernel/time/alarmtimer.c
@@ -429,7 +429,7 @@ int alarm_cancel(struct alarm *alarm)
 		int ret = alarm_try_to_cancel(alarm);
 		if (ret >= 0)
 			return ret;
-		cpu_relax();
+		hrtimer_wait_for_timer(&alarm->timer);
 	}
 }
 EXPORT_SYMBOL_GPL(alarm_cancel);
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH RT 0/3] 4.4.131-rt148-rc1
@ 2018-05-04 13:55 Daniel Wagner
  2018-05-04 13:55 ` [PATCH RT 1/3] alarmtimer: Prevent live lock in alarm_cancel() Daniel Wagner
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Wagner @ 2018-05-04 13:55 UTC (permalink / raw)
  To: linux-rt-users
  Cc: linux-kernel, Steven Rostedt, Thomas Gleixner, Carsten Emde,
	John Kacur, Sebastian Andrzej Siewior, Daniel Wagner,
	Tom Zanussi, Julia Cartwright, Daniel Wagner

Dear RT Folks,

This is the RT stable review cycle of patch 4.4.131-rt148-rc1.

Here are couple of patches from Sebiastian which didn't make into
4.4.126-rt142 cycle.  I haven't included Julia's "seqlock: provide the
same ordering semantics as mainline" patch, because I don't know it
needs a review or not.

The pre-releases will not be pushed to the git repository, only the
final release is.

If all goes well, this patch will be converted to the next main release
on 09.05.2017.

Enjoy,
-- Daniel


Daniel Wagner (1):
  Linux 4.4.131-rt148-rc1

Sebastian Andrzej Siewior (2):
  alarmtimer: Prevent live lock in alarm_cancel()
  posix-timers: move the rcu head out of the union

 include/linux/posix-timers.h | 2 +-
 kernel/time/alarmtimer.c     | 2 +-
 kernel/time/posix-timers.c   | 4 ++--
 localversion-rt              | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

-- 
2.14.3

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-05-04 13:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-28 10:07 [PATCH RT 1/3] alarmtimer: Prevent live lock in alarm_cancel() Sebastian Andrzej Siewior
2018-03-28 10:07 ` [PATCH RT 2/3] posix-timers: user proper timer while waiting for alarmtimer Sebastian Andrzej Siewior
2018-03-28 10:28   ` [PATCH RT 2/3 v2] " Sebastian Andrzej Siewior
2018-03-28 10:07 ` [PATCH RT 3/3] posix-timers: move the rcu head out of the union Sebastian Andrzej Siewior
2018-03-28 10:29   ` [PATCH RT 3/3 v2] " Sebastian Andrzej Siewior
2018-04-03 18:32 ` [PATCH RT 1/3] alarmtimer: Prevent live lock in alarm_cancel() Daniel Wagner
2018-04-04  7:37   ` Sebastian Andrzej Siewior
2018-05-04 13:55 [PATCH RT 0/3] 4.4.131-rt148-rc1 Daniel Wagner
2018-05-04 13:55 ` [PATCH RT 1/3] alarmtimer: Prevent live lock in alarm_cancel() Daniel Wagner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).