aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJP Abgrall <jpa@google.com>2013-04-29 16:07:00 -0700
committerAmit Pundir <amit.pundir@linaro.org>2016-01-04 13:09:11 +0530
commited88b5e74eaea656cf1125399afe718fc8ddd82d (patch)
treedd818409bbbcc4cd3d80550133ab1631ffa410bc
parent6306fde81e633a1260d0f118ecebebc1bab4a328 (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>
-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 daafcf121ce0..506c225c66cc 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -273,10 +273,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 (faulthandler_disabled() || !mm)
+ if (faulthandler_disabled() || irqs_disabled() || !mm)
goto no_context;
if (user_mode(regs))