Skip to content

Commit

Permalink
arch/tile: don't enable irqs unconditionally in page fault handler
Browse files Browse the repository at this point in the history
If we took a page fault while we had interrupts disabled, we
shouldn't enable them in the page fault handler.

Signed-off-by: Chris Metcalf <[email protected]>
  • Loading branch information
cmetcalf-tilera committed Apr 2, 2012
1 parent 12400f1 commit b230ff2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arch/tile/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,12 @@ static int handle_page_fault(struct pt_regs *regs,
/*
* If we're trying to touch user-space addresses, we must
* be either at PL0, or else with interrupts enabled in the
* kernel, so either way we can re-enable interrupts here.
* kernel, so either way we can re-enable interrupts here
* unless we are doing atomic access to user space with
* interrupts disabled.
*/
local_irq_enable();
if (!(regs->flags & PT_FLAGS_DISABLE_IRQ))
local_irq_enable();

mm = tsk->mm;

Expand Down

0 comments on commit b230ff2

Please sign in to comment.