Messages in this thread | | | Date | Mon, 28 Apr 2008 09:24:57 +0200 | From | Ingo Molnar <> | Subject | Re: [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
| |