lkml.org 
[lkml]   [2009]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    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, &current->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))))

    \
     
     \ /
      Last update: 2009-06-06 23:59    [W:0.038 / U:62.372 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site