diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-07-07 08:01:26 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-07-07 08:01:26 +0200 |
| commit | 032f82786f9be4635acaa5f77feca175a4ac5fe1 (patch) | |
| tree | 11ce43c1086d3dec43c92b0a2cc740240b338fb7 /kernel/hrtimer.c | |
| parent | sched: fix accounting in task delay accounting & migration (diff) | |
| parent | Linux 2.6.26-rc9 (diff) | |
| download | linux-032f82786f9be4635acaa5f77feca175a4ac5fe1.tar.gz linux-032f82786f9be4635acaa5f77feca175a4ac5fe1.zip | |
Merge commit 'v2.6.26-rc9' into sched/devel
Diffstat (limited to 'kernel/hrtimer.c')
| -rw-r--r-- | kernel/hrtimer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 421be5fe5cc7..ab80515008f4 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; } |
