aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/traps.c')
-rw-r--r--arch/x86/kernel/traps.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index bde57f0f1616..acb8c0585ab9 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -98,6 +98,12 @@ static inline void preempt_conditional_sti(struct pt_regs *regs)
98 local_irq_enable(); 98 local_irq_enable();
99} 99}
100 100
101static inline void conditional_cli(struct pt_regs *regs)
102{
103 if (regs->flags & X86_EFLAGS_IF)
104 local_irq_disable();
105}
106
101static inline void preempt_conditional_cli(struct pt_regs *regs) 107static inline void preempt_conditional_cli(struct pt_regs *regs)
102{ 108{
103 if (regs->flags & X86_EFLAGS_IF) 109 if (regs->flags & X86_EFLAGS_IF)
@@ -625,8 +631,10 @@ clear_dr7:
625 631
626#ifdef CONFIG_X86_32 632#ifdef CONFIG_X86_32
627debug_vm86: 633debug_vm86:
634 /* reenable preemption: handle_vm86_trap() might sleep */
635 dec_preempt_count();
628 handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, 1); 636 handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, 1);
629 preempt_conditional_cli(regs); 637 conditional_cli(regs);
630 return; 638 return;
631#endif 639#endif
632 640