1 Star 0 Fork 126

ganqx/src-qemu

forked from src-openEuler/qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
acpi-cpu-Fix-detection-of-present-cpu.patch 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
Jiabo Feng 提交于 2024-05-10 16:44 . QEMU update to version 8.2.0-12:
From c2eb1176fe06f359a8102bbacb54760c9c1d5aae Mon Sep 17 00:00:00 2001
From: Keqian Zhu <zhukeqian1@huawei.com>
Date: Sun, 28 Apr 2024 12:50:09 +0800
Subject: [PATCH] acpi/cpu: Fix detection of present cpu
When qemu_present_cpu is false. it means cpu object is
null and then calling of qemu_persistent_cpu() will
cause null pointer access.
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
---
hw/acpi/cpu.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c
index b258396e01..292e1daca2 100644
--- a/hw/acpi/cpu.c
+++ b/hw/acpi/cpu.c
@@ -231,11 +231,7 @@ void cpu_hotplug_hw_init(MemoryRegion *as, Object *owner,
if (qemu_present_cpu(cpu)) {
state->devs[i].is_present = true;
} else {
- if (qemu_persistent_cpu(cpu)) {
- state->devs[i].is_present = true;
- } else {
- state->devs[i].is_present = false;
- }
+ state->devs[i].is_present = false;
}
if (qemu_enabled_cpu(cpu)) {
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ganqx/src-qemu.git
git@gitee.com:ganqx/src-qemu.git
ganqx
src-qemu
src-qemu
master

搜索帮助