[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080428023139.fe318427.akpm@linux-foundation.org>
Date: Mon, 28 Apr 2008 02:31:39 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Heiko Carstens <heiko.carstens@...ibm.com>
Cc: Ingo Molnar <mingo@...e.hu>, Gautham R Shenoy <ego@...ibm.com>,
Paul Jackson <pj@....com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched: missing locking in sched_domains code
On Mon, 28 Apr 2008 11:17:45 +0200 Heiko Carstens <heiko.carstens@...ibm.com> wrote:
> On Mon, Apr 28, 2008 at 01:57:23AM -0700, Andrew Morton wrote:
> > On Mon, 28 Apr 2008 10:49:04 +0200 Heiko Carstens <heiko.carstens@...ibm.com> wrote:
> > > /* doms_cur_mutex serializes access to doms_cur[] array */
> > > -static DEFINE_MUTEX(doms_cur_mutex);
> > > +static DEFINE_MUTEX(sched_domains_mutex);
> >
> > The comment refers to a no-longer-existing lock, and no longer correctly
> > describes the lock's usage.
>
> version 42. Please feel free to change the comment if you think it could
> be better :)
Actually, it's a pretty bad comment ;)
> +/* sched_domains_mutex serializes calls to arch_init_sched_domains,
> + * detach_destroy_domains and partition_sched_domains.
> + */
locks protect *data*, not "calls". This matters. Which data is actually
protected by this lock??
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists