[lkml]   [2006]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[patch 31/32] x86_64: fix boot hang due to nmi watchdog init code
    -stable review patch.  If anyone has any objections, please let us know.

    From: Ravikiran G Thirumalai <>

    2.6.19 stopped booting (or booted based on build/config) on our x86_64
    systems due to a bug introduced in 2.6.19. check_nmi_watchdog schedules an
    IPI on all cpus to busy wait on a flag, but fails to set the busywait flag
    if NMI functionality is disabled.

    This causes the secondary cpus to spin in an endless loop, causing the
    kernel bootup to hang.

    Depending upon the build, the busywait flag got overwritten (stack
    variable) and caused the kernel to bootup on certain builds. Following
    patch fixes the bug by setting the busywait flag before returning from

    I guess using a stack variable is not good here as the calling function
    could potentially return while the busy wait loop is still spinning on the
    flag. I would think this is a good candidate for 2.6.19 stable as well.

    [ cleanups]
    Signed-off-by: Ravikiran Thirumalai <>
    Signed-off-by: Shai Fultheim <>
    Cc: Andi Kleen <>
    Cc: <>
    Signed-off-by: Andrew Morton <>
    Signed-off-by: Chris Wright <>

    arch/x86_64/kernel/nmi.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    --- linux-2.6.19.orig/arch/x86_64/kernel/nmi.c
    +++ linux-2.6.19/arch/x86_64/kernel/nmi.c
    @@ -212,7 +212,7 @@ static __init void nmi_cpu_busy(void *da

    int __init check_nmi_watchdog (void)
    - volatile int endflag = 0;
    + static int __initdata endflag;
    int *counts;
    int cpu;

    @@ -253,6 +253,7 @@ int __init check_nmi_watchdog (void)
    if (!atomic_read(&nmi_active)) {
    atomic_set(&nmi_active, -1);
    + endflag = 1;
    return -1;
    endflag = 1;
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-12-09 01:07    [W:0.029 / U:223.576 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site