aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorSrivatsa Vaddagiri <vatsa@in.ibm.com>2005-09-16 19:27:40 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-17 11:49:59 -0700
commit26ff6ad9786abf6f40a6d3cbb89753b4fa50cb00 (patch)
tree8abf9b85bc5f081460f05c3e8f76328dc690f167 /kernel
parentfa72e26a640e551637f91122d782d5a85d514f5b (diff)
downloadkernel_goldelico_gta04-26ff6ad9786abf6f40a6d3cbb89753b4fa50cb00.zip
kernel_goldelico_gta04-26ff6ad9786abf6f40a6d3cbb89753b4fa50cb00.tar.gz
kernel_goldelico_gta04-26ff6ad9786abf6f40a6d3cbb89753b4fa50cb00.tar.bz2
[PATCH] CPU hotplug breaks wake_up_new_task
Fix a problem wherein a new-born task is added to a dead CPU. Signed-off-by: Srivatsa Vaddagiri <vatsa@in.ibm.com> Acked-by: Nick Piggin <nickpiggin@yahoo.com.au> Acked-by: Shaohua Li <shaohua.li@intel.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/fork.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 8149f36..533ce27 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1062,7 +1062,8 @@ static task_t *copy_process(unsigned long clone_flags,
* parent's CPU). This avoids alot of nasty races.
*/
p->cpus_allowed = current->cpus_allowed;
- if (unlikely(!cpu_isset(task_cpu(p), p->cpus_allowed)))
+ if (unlikely(!cpu_isset(task_cpu(p), p->cpus_allowed) ||
+ !cpu_online(task_cpu(p))))
set_task_cpu(p, smp_processor_id());
/*