[libvirt] [REPOST 1/4] cgroup: Fix possible bug as a result of code motion for vcpu cgroup setup

Martin Kletzander mkletzan at redhat.com
Wed Jan 13 16:06:03 UTC 2016


On Wed, Jan 13, 2016 at 07:29:47AM -0500, John Ferlan wrote:
>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 at redhat.com>
>---
> src/qemu/qemu_cgroup.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>

ACK && safe for freeze.

>diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
>index 1c406ce..91b3328 100644
>--- a/src/qemu/qemu_cgroup.c
>+++ b/src/qemu/qemu_cgroup.c
>@@ -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;
>         }
>
>--
>2.5.0
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160113/63a30c8f/attachment-0001.sig>


More information about the libvir-list mailing list