• Ingo Molnar's avatar
    [PATCH] idle thread preemption fix · dd9baec3
    Ingo Molnar authored
    The early bootup stage is pretty fragile because the idle thread is not yet
    functioning as such and so we need preemption disabled.  Whether the bootup
    fails or not seems to depend on timing details so e.g.  the presence of
    SCHED_SMT makes it go away.
    
    Disabling preemption explicitly has another advantage: the atomicity check
    in schedule() will catch early-bootup schedule() calls from now on.
    
    The patch also fixes another preempt-bkl buglet: interrupt-driven
    forced-preemption didnt go through preempt_schedule() so it resulted in
    auto-dropping of the BKL.  Now we go through preempt_schedule() which
    properly deals with the BKL.
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    dd9baec3
main.c 16.3 KB