lkml.org 
[lkml]   [2008]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] sched: missing locking in sched_domains code

    * Heiko Carstens <heiko.carstens@de.ibm.com> wrote:

    >
    > /*
    > + * Protects against concurrent calls to detach_destroy_domains
    > + * and arch_init_sched_domains.
    > + */
    > +static DEFINE_MUTEX(sched_domains_mutex);
    > +
    > +/*
    > * Partition sched domains as specified by the 'ndoms_new'
    > * cpumasks in the array doms_new[] of cpumasks. This compares
    > * doms_new[] to the current sched domain partitioning, doms_cur[].
    > @@ -7756,7 +7762,8 @@ void partition_sched_domains(int ndoms_n
    > int i, j;
    >
    > lock_doms_cur();
    > -
    > + mutex_lock(&sched_domains_mutex);

    i might be missing something but why not make doms_cur_mutex locking
    unconditional and extend it to detach_destroy_domains() as well?

    Ingo


    \
     
     \ /
      Last update: 2008-04-28 09:27    [W:0.026 / U:0.052 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site