summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-07-03 08:29:34 -0500
committerSebastian Andrzej Siewior <bigeasy@linutronix.de>2018-08-07 16:20:18 +0200
commitd68a9def89d23a885a7551fd4ab2698f40f3e2ed (patch)
treec1c2e2ecf5fe9309a9efefaf4458793ad5312d9b /fs
parent57e08943ff176d235b5767c092f326cc6e13d8fa (diff)
downloadlinux-rt-d68a9def89d23a885a7551fd4ab2698f40f3e2ed.tar.gz
hrtimers: Prepare full preemption
Make cancellation of a running callback in softirq context safe against preemption. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/timerfd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/timerfd.c b/fs/timerfd.c
index cdad49da3ff7..1b304f2f1d08 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -471,7 +471,10 @@ static int do_timerfd_settime(int ufd, int flags,
break;
}
spin_unlock_irq(&ctx->wqh.lock);
- cpu_relax();
+ if (isalarm(ctx))
+ hrtimer_wait_for_timer(&ctx->t.alarm.timer);
+ else
+ hrtimer_wait_for_timer(&ctx->t.tmr);
}
/*