Skip to content

Commit 1b334ec

Browse files
mingqiangchiwenlingz
authored andcommitted
hv: replace 'return' with 'panic' in bsp_boot_post
If hardware_detect_support() failed,as it return to bsp_boot_init with a different stack and thus returning from bsp_boot_init becomes an undefined behavior. Tracked-On: #861 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent bad8d81 commit 1b334ec

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

hypervisor/arch/x86/cpu.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,7 @@ static void bsp_boot_post(void)
461461
pr_dbg("Core %hu is up", BOOT_CPU_ID);
462462

463463
if (hardware_detect_support() != 0) {
464-
pr_fatal("hardware not support!\n");
465-
return;
464+
panic("hardware not support!");
466465
}
467466

468467
/* Warn for security feature not ready */

0 commit comments

Comments
 (0)