[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090212124932.495733E666E@basil.firstfloor.org>
Date: Thu, 12 Feb 2009 13:49:32 +0100 (CET)
From: Andi Kleen <andi@...stfloor.org>
To: akpm@...ux-foundation.org, mingo@...e.hu, tglx@...utronix.de,
hpa@...or.com, linux-kernel@...r.kernel.org
Subject: [PATCH] [3/9] x86: CMCI: Avoid potential reentry of threshold interrupt
Impact: minor bugfix
The threshold handler on AMD (and soon on Intel) could be theoretically
reentered by the hardware. This could lead to corrupted events
because the machine check poll code assumes it is not reentered.
Move the APIC ACK to the end of the interrupt handler to let
the hardware avoid that.
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
arch/x86/kernel/cpu/mcheck/threshold.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: linux/arch/x86/kernel/cpu/mcheck/threshold.c
===================================================================
--- linux.orig/arch/x86/kernel/cpu/mcheck/threshold.c 2009-02-12 11:30:51.000000000 +0100
+++ linux/arch/x86/kernel/cpu/mcheck/threshold.c 2009-02-12 11:30:51.000000000 +0100
@@ -15,10 +15,11 @@
asmlinkage void mce_threshold_interrupt(void)
{
- ack_APIC_irq();
exit_idle();
irq_enter();
inc_irq_stat(irq_threshold_count);
mce_threshold_vector();
irq_exit();
+ /* Ack only at the end to avoid potential reentry */
+ ack_APIC_irq();
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists