]> xenbits.xensource.com Git - libvirt.git/commitdiff
cgroup: Fix possible bug as a result of code motion for vcpu cgroup setup
authorJohn Ferlan <jferlan@redhat.com>
Tue, 22 Dec 2015 14:46:01 +0000 (09:46 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 14 Jan 2016 16:02:53 +0000 (11:02 -0500)
Commit id '90b721e43' moved where the virCgroupAddTask was made until
after the check for the vcpupin checks. However, in doing so it missed
an option where if the cpumap didn't exist, then the code would continue
back to the top of the current vcpu loop. The results was that the
virCgroupAddTask wouldn't be called.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_cgroup.c

index 94b931fb4820c3e3760a623969ba28a162981cfb..e41f4617c455af46649f0537df461a0831f66a6a 100644 (file)
@@ -1079,10 +1079,7 @@ qemuSetupCgroupForVcpu(virDomainObjPtr vm)
                 }
             }
 
-            if (!cpumap)
-                continue;
-
-            if (qemuSetupCgroupCpusetCpus(cgroup_vcpu, cpumap) < 0)
+            if (cpumap && qemuSetupCgroupCpusetCpus(cgroup_vcpu, cpumap) < 0)
                 goto cleanup;
         }