lkml.org 
[lkml]   [2009]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kthreads: Fix startup synchronization boot crash
On 09/01, Ingo Molnar wrote:
>
> * Oleg Nesterov <oleg@redhat.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?

Oleg.



\
 
 \ /
  Last update: 2009-09-01 18:09    [W:0.083 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site