]> git.itanic.dy.fi Git - linux-stable/commit
arm64: fix wrong check of on_sdei_stack in nmi context
authorWei Li <liwei391@huawei.com>
Mon, 1 Apr 2019 03:55:57 +0000 (11:55 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2019 05:22:53 +0000 (07:22 +0200)
commit26ac3d804822b757a6a4f73c0497bc9404f9a8e1
treef77b85c838179062daeaf7d47167cfbfb556d6e0
parent2c52a30e2158ef98a6ade3673e7236d2cde6e429
arm64: fix wrong check of on_sdei_stack in nmi context

[ Upstream commit 1c41860864c8ae0387ef7d44f0000e99cbb2e06d ]

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 <julien.thierry@arm.com>
Signed-off-by: Wei Li <liwei391@huawei.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
arch/arm64/kernel/sdei.c