Messages in this thread Patch in this message |  | | | Date | Sat, 06 Jun 2009 14:55:34 -0700 | | From | Yinghai Lu <> | | Subject | [PATCH 5/6] core: use cpumask_copy instead of = for cpus_allowed in fork |
| |
so later could use nr_cpumask_bits in cpumask_size when MAXSMP is used
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
--- arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 52 ++++++++++++++++++++---------- kernel/fork.c | 2 - 2 files changed, 36 insertions(+), 18 deletions(-) Index: linux-2.6/kernel/fork.c =================================================================== --- linux-2.6.orig/kernel/fork.c +++ linux-2.6/kernel/fork.c @@ -1207,7 +1207,7 @@ static struct task_struct *copy_process( * to ensure it is on a valid CPU (and if not, just force it back to * parent's CPU). This avoids alot of nasty races. */ - p->cpus_allowed = current->cpus_allowed; + cpumask_copy(&p->cpus_allowed, ¤t->cpus_allowed); p->rt.nr_cpus_allowed = current->rt.nr_cpus_allowed; if (unlikely(!cpu_isset(task_cpu(p), p->cpus_allowed) || !cpu_online(task_cpu(p))))
|  |