提交 19c633c6 编写于 作者: J Ján Tomko

Do not access the domain definition in qemuMonitorFindBalloonObjectPath

The monitor code does not hold the virDomainObjPtr lock and should
not access the defitinion.
上级 084ad137
......@@ -1091,7 +1091,6 @@ qemuMonitorFindBalloonObjectPath(qemuMonitorPtr mon)
int ret = -1;
char *path = NULL;
qemuMonitorJSONListPathPtr *bprops = NULL;
virDomainObjPtr vm = mon->vm;
if (mon->balloonpath) {
return 0;
......@@ -1101,15 +1100,6 @@ qemuMonitorFindBalloonObjectPath(qemuMonitorPtr mon)
return -1;
}
/* Not supported */
if (!vm->def->memballoon ||
vm->def->memballoon->model != VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Memory balloon model must be virtio to "
"get memballoon path"));
return -1;
}
if (qemuMonitorJSONFindLinkPath(mon, "virtio-balloon-pci", &path) < 0)
return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册