diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/traps_32.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index 0429c5de5ea9..203b863ac2a8 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c | |||
@@ -84,6 +84,12 @@ static unsigned int code_bytes = 64; | |||
84 | static int ignore_nmis; | 84 | static int ignore_nmis; |
85 | static int die_counter; | 85 | static int die_counter; |
86 | 86 | ||
87 | static inline void conditional_sti(struct pt_regs *regs) | ||
88 | { | ||
89 | if (regs->flags & X86_EFLAGS_IF) | ||
90 | local_irq_enable(); | ||
91 | } | ||
92 | |||
87 | void printk_address(unsigned long address, int reliable) | 93 | void printk_address(unsigned long address, int reliable) |
88 | { | 94 | { |
89 | #ifdef CONFIG_KALLSYMS | 95 | #ifdef CONFIG_KALLSYMS |
@@ -859,7 +865,7 @@ void __kprobes do_int3(struct pt_regs *regs, long error_code) | |||
859 | * This is an interrupt gate, because kprobes wants interrupts | 865 | * This is an interrupt gate, because kprobes wants interrupts |
860 | * disabled. Normal trap handlers don't. | 866 | * disabled. Normal trap handlers don't. |
861 | */ | 867 | */ |
862 | restore_interrupts(regs); | 868 | conditional_sti(regs); |
863 | 869 | ||
864 | do_trap(3, SIGTRAP, "int3", 1, regs, error_code, NULL); | 870 | do_trap(3, SIGTRAP, "int3", 1, regs, error_code, NULL); |
865 | } | 871 | } |