arm64: fix wrong check of on_sdei_stack in nmi context
authorWei Li <[email protected]>
Mon, 1 Apr 2019 03:55:57 +0000 (11:55 +0800)
committerCatalin Marinas <[email protected]>
Thu, 4 Apr 2019 15:02:25 +0000 (16:02 +0100)
commit1c41860864c8ae0387ef7d44f0000e99cbb2e06d
tree3eb98c1d7d1707eefe047067f22cf3017460adf4
parent79a3aaa7b82e3106be97842dedfd8429248896e6
arm64: fix wrong check of on_sdei_stack in nmi context

When doing unwind_frame() in the context of pseudo nmi (need enable
CONFIG_ARM64_PSEUDO_NMI), reaching the bottom of the stack (fp == 0,
pc != 0), function on_sdei_stack() will return true while the sdei acpi
table is not inited in fact. This will cause a "NULL pointer dereference"
oops when going on.

Reviewed-by: Julien Thierry <[email protected]>
Signed-off-by: Wei Li <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
arch/arm64/kernel/sdei.c