summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJP Abgrall <jpa@google.com>2013-04-29 16:07:00 -0700
committerNitin Garg <nitin.garg@freescale.com>2014-04-21 22:35:13 -0500
commitc94e3e3578e719f99e7cd26c67507b764a0134aa (patch)
treebb54d1435267cf4eb597c16a2ffc6031c9761222 /arch
parent2e1ed4a031809ba32d88523b878387e186d6118b (diff)
ARM: fault: assume no context when IRQs are disabled during data abort.
Bail out early if IRQs are disabled in do_page_fault or else [14415.157266] BUG: sleeping function called from invalid context at arch/arm/mm/fault.c:301 Russell King's idea from http://comments.gmane.org/gmane.linux.ports.arm.omap/59256 Signed-off-by: JP Abgrall <jpa@google.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mm/fault.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 5dbf13f954f6..b835c9e3b770 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -276,10 +276,10 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
local_irq_enable();
/*
- * If we're in an interrupt or have no user
+ * If we're in an interrupt, or have no irqs, or have no user
* context, we must not take the fault..
*/
- if (in_atomic() || !mm)
+ if (in_atomic() || irqs_disabled() || !mm)
goto no_context;
/*