From: Chris Metcalf Date: Thu, 29 Mar 2012 19:40:50 +0000 (-0400) Subject: arch/tile: don't enable irqs unconditionally in page fault handler X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=b230ff2d5c53bb79e1121554cd3c827e5c1b70fd;p=deliverable%2Flinux.git 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 --- 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, /* * 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;