arm64: Enable interrupts in the EL0 undef handler
authorCatalin Marinas <catalin.marinas@arm.com>
Thu, 22 Aug 2013 10:47:37 +0000 (11:47 +0100)
committerMark Brown <broonie@linaro.org>
Thu, 15 May 2014 18:59:56 +0000 (19:59 +0100)
do_undefinstr() has to be called with interrupts disabled since it may
read the instruction from the user address space which could lead to a
data abort and subsequent might_sleep() warning in do_page_fault().

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 2600e130b3c90c8d6c13229d3d3a14dcb898a87b)
Signed-off-by: Mark Brown <broonie@linaro.org>
arch/arm64/kernel/entry.S

index 6ad781b21c080a50c4c061dbd4037beafe8ba09b..57640df9d70cb36d41990915731f80f807045dc0 100644 (file)
@@ -476,6 +476,8 @@ el0_undef:
         * Undefined instruction
         */
        mov     x0, sp
+       // enable interrupts before calling the main handler
+       enable_irq
        b       do_undefinstr
 el0_dbg:
        /*