Commit 5cfceb83 authored by Robert Love's avatar Robert Love Committed by Linus Torvalds

[PATCH] migration thread fix

Attached is a patch that disables interrupts while holding the rq_lock.
This is certainly needed to prevent a race against the timer tick, as
Erich Focht pointed out.
parent 4675eab8
......@@ -1782,9 +1782,11 @@ static int migration_thread(void * unused)
cpu_src = p->thread_info->cpu;
rq_src = cpu_rq(cpu_src);
local_irq_save(flags);
double_rq_lock(rq_src, rq_dest);
if (p->thread_info->cpu != cpu_src) {
double_rq_unlock(rq_src, rq_dest);
local_irq_restore(flags);
goto repeat;
}
if (rq_src == rq) {
......@@ -1795,6 +1797,7 @@ static int migration_thread(void * unused)
}
}
double_rq_unlock(rq_src, rq_dest);
local_irq_restore(flags);
up(&req->sem);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment