diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2012-03-29 15:40:50 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2012-04-02 12:13:09 -0400 |
commit | b230ff2d5c53bb79e1121554cd3c827e5c1b70fd (patch) | |
tree | 8242201e0e5c28c65ef7f5330f72510e90126122 /arch | |
parent | 12400f1f22ad7651efa1d3d06dd8b6b178d19ea3 (diff) |
arch/tile: don't enable irqs unconditionally in page fault handler
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 <cmetcalf@tilera.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/tile/mm/fault.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/tile/mm/fault.c b/arch/tile/mm/fault.c index a1da473c8555..22e58f51ed23 100644 --- a/arch/tile/mm/fault.c +++ b/arch/tile/mm/fault.c | |||
@@ -342,9 +342,12 @@ static int handle_page_fault(struct pt_regs *regs, | |||
342 | /* | 342 | /* |
343 | * If we're trying to touch user-space addresses, we must | 343 | * If we're trying to touch user-space addresses, we must |
344 | * be either at PL0, or else with interrupts enabled in the | 344 | * be either at PL0, or else with interrupts enabled in the |
345 | * kernel, so either way we can re-enable interrupts here. | 345 | * kernel, so either way we can re-enable interrupts here |
346 | * unless we are doing atomic access to user space with | ||
347 | * interrupts disabled. | ||
346 | */ | 348 | */ |
347 | local_irq_enable(); | 349 | if (!(regs->flags & PT_FLAGS_DISABLE_IRQ)) |
350 | local_irq_enable(); | ||
348 | 351 | ||
349 | mm = tsk->mm; | 352 | mm = tsk->mm; |
350 | 353 | ||