All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Gautham R Shenoy <ego@in.ibm.com>, Paul Jackson <pj@sgi.com>,
	linux-kernel@vger.kernel.org,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH] sched: missing locking in sched_domains code
Date: Mon, 28 Apr 2008 09:24:57 +0200	[thread overview]
Message-ID: <20080428072456.GA26944@elte.hu> (raw)
In-Reply-To: <20080428070946.GA4507@osiris.boeblingen.de.ibm.com>


* 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

  reply	other threads:[~2008-04-28  7:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-27 21:12 [PATCH] sched: missing locking in sched_domains code Heiko Carstens
2008-04-28  1:39 ` Andrew Morton
2008-04-28  7:09   ` Heiko Carstens
2008-04-28  7:24     ` Ingo Molnar [this message]
2008-04-28  7:28     ` Andrew Morton
2008-04-28  7:52       ` Heiko Carstens
2008-04-28  8:11         ` Heiko Carstens
2008-04-28  8:32           ` Ingo Molnar
2008-04-28  8:49             ` Heiko Carstens
2008-04-28  8:57               ` Andrew Morton
2008-04-28  9:17                 ` Heiko Carstens
2008-04-28  9:31                   ` Andrew Morton
2008-04-28  9:33                   ` Heiko Carstens
2008-04-28 12:27                     ` Ingo Molnar
2008-04-28 13:13                     ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080428072456.GA26944@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=ego@in.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.