From: JP Abgrall Date: Mon, 29 Apr 2013 23:07:00 +0000 (-0700) Subject: ANDROID: arm: fault: assume no context when IRQs are disabled during data abort. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=790dd7df4103c95630032e84dd98e37b18c961cd;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ANDROID: 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 --- diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 42f585379e19..6123d126e5ae 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -274,10 +274,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))