[PATCH 09/10] Do not access the domain definition in qemuMonitorFindBalloonObjectPath

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The monitor code does not hold the virDomainObjPtr lock and should
not access the defitinion.
---
 src/qemu/qemu_monitor.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 9add05c..6947b08 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -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;
 
-- 
2.3.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]