Messages in this thread Patch in this message | | | From | Erich Focht <> | Subject | small migration thread fix | Date | Fri, 10 Jan 2003 13:46:03 +0100 |
| |
Hi,
the small patch fixes a potential problem in the migration thread for the case that the first CPU in the cpus_allowed mask of a process is offline. Please consider applying it to your trees.
Thanks! Regards, Erich
diff -urNp linux-2.5.55/kernel/sched.c linux-2.5.55-fix/kernel/sched.c --- linux-2.5.55/kernel/sched.c 2003-01-09 05:04:22.000000000 +0100 +++ linux-2.5.55-fix/kernel/sched.c 2003-01-10 13:37:40.000000000 +0100 @@ -2108,7 +2108,7 @@ static int migration_thread(void * data) spin_unlock_irqrestore(&rq->lock, flags); p = req->task; - cpu_dest = __ffs(p->cpus_allowed); + cpu_dest = __ffs(p->cpus_allowed & cpu_online_map); rq_dest = cpu_rq(cpu_dest); repeat: cpu_src = task_cpu(p); | |