Commit 2dfa9f6a authored by Xiongfeng Wang's avatar Xiongfeng Wang
Browse files

arm64: kexec: only clear EOI for SDEI in NMI context

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8LQCC


CVE: NA

----------------------------------------

We need to clear EOI for the secure timer only when we panic from
sdei_handler. If we clear EOI for the secure timer in normal panic
routiue, it has no bad effect on Hi1620, but it may cause undefine
behavior on Hi1616. So add a check for NMI context before we clear EOI
for the secure timer.

Fixes: dd397d5febc4("sdei_watchdog: clear EOI of the secure timer before
kdump")

Signed-off-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
Reviewed-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent dab3bdb9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -270,6 +270,7 @@ void machine_crash_shutdown(struct pt_regs *regs)
	 * interrupt failed to trigger in the second kernel. So we clear eoi
	 * of the secure timer before booting the second kernel.
	 */
	if (in_nmi())
		sdei_watchdog_clear_eoi();

	/* for crashing cpu */