[libvirt] [PATCH 1/4] qemu: process: Clean automatic NUMA/cpu pinning information on shutdown

Peter Krempa pkrempa at redhat.com
Wed Apr 26 13:03:57 UTC 2017


Clean the stale data after shutting down the VM. Otherwise the data
would be leaked on next VM start. This happens due to the fact that the
private data object is not freed on destroy of the VM.
---
 src/qemu/qemu_process.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 53170d732..e44359575 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -6435,6 +6435,12 @@ void qemuProcessStop(virQEMUDriverPtr driver,
     priv->qemuCaps = NULL;
     VIR_FREE(priv->pidfile);

+    /* remove automatic pinning data */
+    virBitmapFree(priv->autoNodeset);
+    priv->autoNodeset = NULL;
+    virBitmapFree(priv->autoCpuset);
+    priv->autoCpuset = NULL;
+
     /* The "release" hook cleans up additional resources */
     if (virHookPresent(VIR_HOOK_DRIVER_QEMU)) {
         char *xml = qemuDomainDefFormatXML(driver, vm->def, 0);
-- 
2.12.2




More information about the libvir-list mailing list