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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Nov 2019 17:29:02 +0000 (18:29 +0100)
commit80ade6178da2033c9c939c94636e2d466d3e957c
tree574073ebe2a29d1f5295dbda7a1afb3b4cc7f780
parent5de1a7fc74309edceed5faaf18fe0f4ffd0eac89
arm64: fix for bad_mode() handler to always result in panic

commit e4ba15debcfd27f60d43da940a58108783bff2a6 upstream.

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>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/traps.c