mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
[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>
This commit is contained in:
parent
fa72e26a64
commit
26ff6ad978
1 changed files with 2 additions and 1 deletions
|
@ -1062,7 +1062,8 @@ static task_t *copy_process(unsigned long clone_flags,
|
||||||
* parent's CPU). This avoids alot of nasty races.
|
* parent's CPU). This avoids alot of nasty races.
|
||||||
*/
|
*/
|
||||||
p->cpus_allowed = current->cpus_allowed;
|
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());
|
set_task_cpu(p, smp_processor_id());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue