diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-01-25 11:08:40 +0100 |
---|---|---|
committer | Gary S. Robertson <gary.robertson@linaro.org> | 2014-05-07 08:55:58 -0500 |
commit | 307cb08956a47a6e4a9e0daf2a46333ec92835b3 (patch) | |
tree | f7e0b0bfaa20a4e0f0b3d77acc2977d42f335efd /fs | |
parent | 9d8aa38d6d0738213197a913f12232f237e52135 (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
Diffstat (limited to 'fs')
-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 32b644f03690..1844c9733e44 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c @@ -308,7 +308,7 @@ static int do_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); } /* |