From: Ingo Molnar <mingo@elte.hu>

on 32-bit, system gates are traps.

on 64-bit, they are interrupts (which disable hardirqs).

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/asm-x86/desc.h |    4 ++++
 1 file changed, 4 insertions(+)

diff -puN include/asm-x86/desc.h~x86-fix-system-gate-related-crash include/asm-x86/desc.h
--- a/include/asm-x86/desc.h~x86-fix-system-gate-related-crash
+++ a/include/asm-x86/desc.h
@@ -328,7 +328,11 @@ static inline void set_trap_gate(unsigne
 static inline void set_system_gate(unsigned int n, void *addr)
 {
 	BUG_ON((unsigned)n > 0xFF);
+#ifdef CONFIG_X86_32
+	_set_gate(n, GATE_TRAP, addr, 0x3, 0, __KERNEL_CS);
+#else
 	_set_gate(n, GATE_INTERRUPT, addr, 0x3, 0, __KERNEL_CS);
+#endif
 }
 
 static inline void set_task_gate(unsigned int n, unsigned int gdt_entry)
_
