Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Daniel Walker and committed by
Linus Torvalds
d9586548 a534b679

+1 -1
+1 -1
arch/i386/kernel/nmi.c
··· 115 115 atomic_dec(&nmi_active); 116 116 } 117 117 } 118 + endflag = 1; 118 119 if (!atomic_read(&nmi_active)) { 119 120 kfree(prev_nmi_count); 120 121 atomic_set(&nmi_active, -1); 121 122 return -1; 122 123 } 123 - endflag = 1; 124 124 printk("OK.\n"); 125 125 126 126 /* now that we know it works we can reduce NMI frequency to