Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f556868a authored by JP Abgrall's avatar JP Abgrall Committed by Dmitry Shmidt
Browse files

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: default avatarJP Abgrall <jpa@google.com>
parent 813f2675
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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))