diff options
author | Paul Mackerras <paulus@samba.org> | 2006-03-03 07:11:40 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-03 07:11:40 +0100 |
commit | cd8a5673e9abb3fde0a1c25ee63a60fe1908c6f5 (patch) | |
tree | f8bc6f147866659a2fc6ba820df16e4738922971 /arch | |
parent | [PATCH] reiserfs: do not check if unsigned < 0 (diff) | |
download | linux-cd8a5673e9abb3fde0a1c25ee63a60fe1908c6f5.tar.xz linux-cd8a5673e9abb3fde0a1c25ee63a60fe1908c6f5.zip |
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')
-rw-r--r-- | arch/powerpc/kernel/traps.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 7509aa6474f2..98660aedeeb7 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)) { |