[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090902130644.GA19528@elte.hu>
Date: Wed, 2 Sep 2009 15:06:44 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Oleg Nesterov <oleg@...hat.com>
Cc: arjan@...radead.org, jeremy@...p.org, mschmidt@...hat.com,
mingo@...hat.com, hpa@...or.com, linux-kernel@...r.kernel.org,
tj@...nel.org, tglx@...utronix.de,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-tip-commits@...r.kernel.org
Subject: Re: [PATCH] kthreads: Fix startup synchronization boot crash
* Oleg Nesterov <oleg@...hat.com> wrote:
> On 09/01, Ingo Molnar wrote:
> >
> > * Oleg Nesterov <oleg@...hat.com> wrote:
> >
> > > But I must admit, now I don't understand what happens,
> > >
> > > The modification of that variable is protected by the BKL, but
> > > the _ordering_ of the initial task (which becomes the idle
> > > thread of CPU0) and the init task (which is spawned by the
> > > initial task) is not synchronized.
> > >
> > > So we can occasionally end up init running sooner than
> > > rest_init()
> > >
> > > How? rest_init() can't be preempted and it holds BKL. And
> > > kernel_init() takes BKL before anything else. Confused...
> >
> > it cannot be preempted but it can schedule anywhere - and the BKL
> > will be dropped silently.
> >
> > This is one of the biggest dangers of the BKL
>
> Yes I see. But rest_init() runs under preempt_disable(). If it was
> rescheduled, schedule_debug() should complain. No?
hm, either something is broken, or some other codepath learned to do
preempt_enable() in early init ... [which i'd call broken too]
Weird.
Ingo
--
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