From: Peter Zijlstra Date: Sun, 20 Dec 2009 16:36:27 +0000 (+0100) Subject: sched: Fix hotplug hang X-Git-Tag: v2.6.32.22~39 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=05e067a973d46e3c5348050b99c23c0584732b48;p=karo-tx-linux.git sched: Fix hotplug hang commit 70f1120527797adb31c68bdc6f1b45e182c342c7 upstream The hot-unplug kstopmachine usage does a wakeup after deactivating the cpu, hence we cannot use cpu_active() here but must rely on the good olde online. Reported-by: Sachin Sant Reported-by: Jens Axboe Signed-off-by: Peter Zijlstra Tested-by: Jens Axboe Cc: Heiko Carstens Cc: Benjamin Herrenschmidt LKML-Reference: <1261326987.4314.24.camel@laptop> Signed-off-by: Ingo Molnar Signed-off-by: Mike Galbraith Signed-off-by: Greg Kroah-Hartman --- diff --git a/kernel/sched.c b/kernel/sched.c index 86f2a6b61da5..b8ece01d4344 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -2376,7 +2376,7 @@ int select_task_rq(struct task_struct *p, int sd_flags, int wake_flags) * not worry about this generic constraint ] */ if (unlikely(!cpumask_test_cpu(cpu, &p->cpus_allowed) || - !cpu_active(cpu))) + !cpu_online(cpu))) cpu = select_fallback_rq(task_cpu(p), p); return cpu;