aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDaniel Walker <dwalker@mvista.com>2007-09-06 10:59:54 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-09-10 21:57:47 -0400
commitd95865480de280b892e19fe90921601876da5775 (patch)
tree31334c3c67e386949213015ff2c1f3a09c8b874b /arch
parenta534b679180025aa324ebd63c05516e478551cfd (diff)
i386: fix a hang on stuck nmi watchdog
In the case when an nmi gets stucks the endflag stays equal to zero. This causes the busy looping on other cpus to continue, even though the nmi test is done. On my machine with out the change below the system would hang right after check_nmi_watchdog(). The change below just sets endflag prior to checking if the test was successful or not. Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/nmi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index 8c1c965eb2a8..c7227e2180f8 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -115,12 +115,12 @@ static int __init check_nmi_watchdog(void)
115 atomic_dec(&nmi_active); 115 atomic_dec(&nmi_active);
116 } 116 }
117 } 117 }
118 endflag = 1;
118 if (!atomic_read(&nmi_active)) { 119 if (!atomic_read(&nmi_active)) {
119 kfree(prev_nmi_count); 120 kfree(prev_nmi_count);
120 atomic_set(&nmi_active, -1); 121 atomic_set(&nmi_active, -1);
121 return -1; 122 return -1;
122 } 123 }
123 endflag = 1;
124 printk("OK.\n"); 124 printk("OK.\n");
125 125
126 /* now that we know it works we can reduce NMI frequency to 126 /* now that we know it works we can reduce NMI frequency to