diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-01-25 10:08:40 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2013-04-04 22:09:19 (GMT) |
commit | 42b4e8d5f84744d513fd65b9b999b3badf76e92e (patch) | |
tree | 5a87bfc25e126d17fcc526ca062ab2e965bece4a /fs/timerfd.c | |
parent | 3bc739a0e3a70b7b196c2044b0824a7292556509 (diff) | |
download | linux-fsl-qoriq-42b4e8d5f84744d513fd65b9b999b3badf76e92e.tar.xz |
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
Diffstat (limited to 'fs/timerfd.c')
-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 d03822b..522aeb8 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c @@ -311,7 +311,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); } /* |