]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: fix for bad_mode() handler to always result in panic
authorHari Vyas <hari.vyas@broadcom.com>
Tue, 7 Aug 2018 11:03:48 +0000 (16:33 +0530)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 14 Sep 2018 16:46:25 +0000 (17:46 +0100)
commitd0455d3e4ab75fe7c07e86c46d2132786881dcca
tree2a01ebdec3611ac984827b78dde854ee8ec83f53
parent144eb8a2f26eb734822e5d1c1b1144f7a06bfba1
arm64: fix for bad_mode() handler to always result in panic

The bad_mode() handler is called if we encounter an uunknown exception,
with the expectation that the subsequent call to panic() will halt the
system. Unfortunately, if the exception calling bad_mode() is taken from
EL0, then the call to die() can end up killing the current user task and
calling schedule() instead of falling through to panic().

Remove the die() call altogether, since we really want to bring down the
machine in this "impossible" case.

Signed-off-by: Hari Vyas <hari.vyas@broadcom.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/traps.c