aboutsummaryrefslogtreecommitdiff
path: root/kernel/hrtimer.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-14 10:31:59 +0200
committerIngo Molnar <mingo@elte.hu>2008-07-14 10:31:59 +0200
commitb4ba0ba24b57ec975482f4ba2d350fbee7557240 (patch)
treec076e4c4e446180d6a36df3d55ae2ba7b0d7736e /kernel/hrtimer.c
parenta033c332e047397904ed74816946b2edd9b0d5cd (diff)
parentbce7f793daec3e65ec5c5705d2457b81fe7b5725 (diff)
Merge commit 'v2.6.26' into core/locking
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r--kernel/hrtimer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 421be5fe5cc..ab80515008f 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1003,10 +1003,18 @@ hrtimer_start(struct hrtimer *timer, ktime_t tim, const enum hrtimer_mode mode)
*/
raise = timer->state == HRTIMER_STATE_PENDING;
+ /*
+ * We use preempt_disable to prevent this task from migrating after
+ * setting up the softirq and raising it. Otherwise, if me migrate
+ * we will raise the softirq on the wrong CPU.
+ */
+ preempt_disable();
+
unlock_hrtimer_base(timer, &flags);
if (raise)
hrtimer_raise_softirq();
+ preempt_enable();
return ret;
}