Re: [PATCH] kthreads: Fix startup synchronization boot crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH] kthreads: Fix startup synchronization boot crash
- From: Oleg Nesterov <oleg@xxxxxxxxxx>
- Date: Tue, 1 Sep 2009 18:00:44 +0200
- Cc: arjan@xxxxxxxxxxxxx, jeremy@xxxxxxxx, mschmidt@xxxxxxxxxx, mingo@xxxxxxxxxx, hpa@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, tj@xxxxxxxxxx, tglx@xxxxxxxxxxxxx, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, linux-tip-commits@xxxxxxxxxxxxxxx
- In-reply-to: <20090901155427.GA18078@xxxxxxx>
- References: <20090829182718.10f566b1@leela> <tip-23386d63bbb3199cf247313ec088878d72debcfd@xxxxxxxxxxxxxx> <20090901100351.GA3361@xxxxxxx> <20090901113914.GA23578@xxxxxxx> <20090901130436.GA22514@xxxxxxxxxx> <20090901131440.GA29783@xxxxxxx> <20090901133709.GA24041@xxxxxxxxxx> <20090901135925.GA9083@xxxxxxx> <20090901145526.GA31317@xxxxxxxxxx> <20090901155427.GA18078@xxxxxxx>
- User-agent: Mutt/1.5.18 (2008-05-17)
On 09/01, Ingo Molnar wrote:
>
> * Oleg Nesterov <oleg@xxxxxxxxxx> 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?
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Stable Commits]
[Linux Stable Kernel]
[Linux Kernel]
[Linux USB Devel]
[Linux Video &Media]
[Linux Audio Users]
[Yosemite News]
[Linux SCSI]