Commit 26ff6ad9 authored by Srivatsa Vaddagiri's avatar Srivatsa Vaddagiri Committed by Linus Torvalds
Browse files

[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: default avatarSrivatsa Vaddagiri <>
Acked-by: default avatarNick Piggin <>
Acked-by: default avatarShaohua Li <>
Acked-by: default avatarIngo Molnar <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent fa72e26a
......@@ -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) ||
set_task_cpu(p, smp_processor_id());
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