From: JP Abgrall Date: Mon, 29 Apr 2013 23:07:00 +0000 (-0700) Subject: ARM: fault: assume no context when IRQs are disabled during data abort. X-Git-Tag: firefly_0821_release~4090^2~579 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=50bf9d6b0c5e99b9c16a6014d44cf7f53dfbce37;p=firefly-linux-kernel-4.4.55.git 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 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; /*