aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/traps.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-03-03 17:11:40 +1100
committerPaul Mackerras <paulus@samba.org>2006-03-03 17:11:40 +1100
commitcd8a5673e9abb3fde0a1c25ee63a60fe1908c6f5 (patch)
treef8bc6f147866659a2fc6ba820df16e4738922971 /arch/powerpc/kernel/traps.c
parentc499ec24c31edf270e777a868ffd0daddcfe7ebd (diff)
powerpc: Fix might-sleep warning in program check exception handler
On 32-bit, the exception prolog for the program check exception doesn't enable interrupts early on. If it is an illegal instruction exception, we read the instruction in order to emulate certain instructions, and the get_user of the instruction triggers a WARN_ON since interrupts are still disabled. This adds a local_irq_enable() to enable interrupts before reading the instruction. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/traps.c')
-rw-r--r--arch/powerpc/kernel/traps.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 7509aa6474f..98660aedeeb 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -814,6 +814,8 @@ void __kprobes program_check_exception(struct pt_regs *regs)
return;
}
+ local_irq_enable();
+
/* Try to emulate it if we should. */
if (reason & (REASON_ILLEGAL | REASON_PRIVILEGED)) {
switch (emulate_instruction(regs)) {