Skip to content

Commit

Permalink
powerpc: Fix might-sleep warning in program check exception handler
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mackerras committed Mar 3, 2006
1 parent c499ec2 commit cd8a567
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/powerpc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit cd8a567

Please sign in to comment.