4f84e4be53
Background:
When a userspace application wants to know about machine check events, it
opens /dev/mcelog and does a read(). Usually, we found that this interface
works well, but in some cases, when the system was taking large numbers of
machine check exceptions, the read() would hang. The system would output a
soft-lockup warning, and the daemon reading from /dev/mcelog would suck up
as much of a single CPU as it could spinning in system space.
Description:
This patch fixes this bug. In particular, there was a "continue" inside a
timeout loop that presumably was intended to break out of the outer loop,
but instead caused the inner loop to continue. This patch also makes the
condition for the break-out a little more evident by changing a
!time_before to a time_after_eq.
Result:
The read() no longer hangs in this test case.
Testing:
On my system, I could replicate the bug with the following command:
# for i in `seq 15000`; do ./inject_sbe.sh; done
where inject_sbe.sh contains commands to inject a single-bit error into the
next memory write transaction.
Patch:
This patch is against git
|
||
---|---|---|
.. | ||
acpi | ||
cpufreq | ||
aperture.c | ||
apic.c | ||
asm-offsets.c | ||
audit.c | ||
bugs.c | ||
crash_dump.c | ||
crash.c | ||
e820.c | ||
early_printk.c | ||
early-quirks.c | ||
entry.S | ||
genapic_flat.c | ||
genapic.c | ||
head64.c | ||
head.S | ||
hpet.c | ||
i387.c | ||
i8259.c | ||
init_task.c | ||
io_apic.c | ||
ioport.c | ||
irq.c | ||
k8.c | ||
kprobes.c | ||
ldt.c | ||
machine_kexec.c | ||
Makefile | ||
mce_amd.c | ||
mce_intel.c | ||
mce.c | ||
module.c | ||
mpparse.c | ||
nmi.c | ||
pci-calgary.c | ||
pci-dma.c | ||
pci-gart.c | ||
pci-nommu.c | ||
pci-swiotlb.c | ||
pmtimer.c | ||
process.c | ||
ptrace.c | ||
reboot.c | ||
relocate_kernel.S | ||
setup64.c | ||
setup.c | ||
signal.c | ||
smp.c | ||
smpboot.c | ||
stacktrace.c | ||
suspend_asm.S | ||
suspend.c | ||
sys_x86_64.c | ||
syscall.c | ||
tce.c | ||
time.c | ||
trampoline.S | ||
traps.c | ||
tsc_sync.c | ||
tsc.c | ||
verify_cpu.S | ||
vmlinux.lds.S | ||
vsmp.c | ||
vsyscall.c | ||
x8664_ksyms.c |