From c8e5177303f1b17a5e3116c6a8693391a3539bb9 Mon Sep 17 00:00:00 2001 From: Luyao Huang Date: Fri, 14 Aug 2015 17:37:28 +0800 Subject: [PATCH] qemu: add a check for nodeset in qemuDomainSetNumaParamsLive We will try to set the node to cpuset.mems without check if it is available, since we already have helper to check this. Call virNumaNodesetIsAvailable to check if node is available, then try to change it in the cgroup. Signed-off-by: Luyao Huang --- src/qemu/qemu_driver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a90d304160..57098ee5a5 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -9995,6 +9995,9 @@ qemuDomainSetNumaParamsLive(virDomainObjPtr vm, goto cleanup; } + if (!virNumaNodesetIsAvailable(nodeset)) + goto cleanup; + /* Ensure the cpuset string is formatted before passing to cgroup */ if (!(nodeset_str = virBitmapFormat(nodeset))) goto cleanup;