diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-01-25 11:08:40 +0100 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-05-14 12:37:14 -0400 |
commit | 902e3ac5150588cfa9393116658b69b6fd3056c7 (patch) | |
tree | 7e49cb8da81eaf7a379aaa8aedfe32b3a014c032 | |
parent | 0bcb289dd7210af837a8742adda4617a9abae9dd (diff) |
timer-fd: Prevent live lock
If hrtimer_try_to_cancel() requires a retry, then depending on the
priority setting te retry loop might prevent timer callback completion
on RT. Prevent that by waiting for completion on RT, no change for a
non RT kernel.
Reported-by: Sankara Muthukrishnan <sankara.m@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable-rt@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | fs/timerfd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/timerfd.c b/fs/timerfd.c index dffeb3795af1..57f0e4e86f0a 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c @@ -313,7 +313,7 @@ SYSCALL_DEFINE4(timerfd_settime, int, ufd, int, flags, if (hrtimer_try_to_cancel(&ctx->tmr) >= 0) break; spin_unlock_irq(&ctx->wqh.lock); - cpu_relax(); + hrtimer_wait_for_timer(&ctx->tmr); } /* |