1 Star 0 Fork 72

ShenYage/libvirt_src-openEuler

forked from src-openEuler/libvirt 
Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
libvirt-qemu-add-pointer-check-in-qemuMonitorLastError.patch 1.03 KB
Copy Edit Raw Blame History
Xu Yandong authored 2020-05-11 16:39 +08:00 . cherry-pick bugfixes from version 5.5.0
From 2d72ad8dfbd8987379a58fd9b280cdaf4d191542 Mon Sep 17 00:00:00 2001
From: Feng Ni <fengni@huawei.com>
Date: Wed, 15 Apr 2020 11:14:35 +0800
Subject: qemu: add pointer check in qemuMonitorLastError
We found a exception when libvirt occurrs segmentation fault.
thread 1 is waiting object lock in qemuConnectMonitor,
qemu process exits and sends EOF event as well, so thread 2 invokes
qemuMonitorLastError but pointer mon is NULL.
Signed-off-by: Feng Ni <fengni@huawei.com>
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
---
src/qemu/qemu_monitor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index a62fed8..cc62948 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -966,7 +966,7 @@ qemuMonitorSend(qemuMonitorPtr mon,
virErrorPtr
qemuMonitorLastError(qemuMonitorPtr mon)
{
- if (mon->lastError.code == VIR_ERR_OK)
+ if (!mon || mon->lastError.code == VIR_ERR_OK)
return NULL;
return virErrorCopyNew(&mon->lastError);
--
2.23.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jacob1996/libvirt_src-openEuler.git
git@gitee.com:jacob1996/libvirt_src-openEuler.git
jacob1996
libvirt_src-openEuler
libvirt_src-openEuler
openEuler-21.03-20210330

Search