[PATCH v2 1/9] fix bug in qemuSetupCgroupForEmulator

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

 



Should not return 0 when failed to setup cgroup.
---
 src/qemu/qemu_cgroup.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index 5b42793..c95cc77 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -691,13 +691,15 @@ int qemuSetupCgroupForEmulator(struct qemud_driver *driver,
     }
 
     if (def->cputune.emulatorpin &&
-        qemuCgroupControllerActive(driver, VIR_CGROUP_CONTROLLER_CPUSET) &&
-        qemuSetupCgroupEmulatorPin(cgroup_emulator, def->cputune.emulatorpin) < 0)
+        qemuCgroupControllerActive(driver, VIR_CGROUP_CONTROLLER_CPUSET)) {
+        rc = qemuSetupCgroupEmulatorPin(cgroup_emulator, def->cputune.emulatorpin);
+        if (rc < 0)
         goto cleanup;
+    }
 
     if (period || quota) {
         if (qemuCgroupControllerActive(driver, VIR_CGROUP_CONTROLLER_CPU)) {
-            if (qemuSetupCgroupVcpuBW(cgroup_emulator, period, quota) < 0)
+            if ((rc = qemuSetupCgroupVcpuBW(cgroup_emulator, period, quota)) < 0)
                 goto cleanup;
         }
     }
-- 
1.7.10.2

--
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]