render / rpms / libvirt

Forked from rpms/libvirt 7 months ago
Clone
3e5111
From 9cde726d82715272f2b06580dde9a65882263e85 Mon Sep 17 00:00:00 2001
3e5111
Message-Id: <9cde726d82715272f2b06580dde9a65882263e85@dist-git>
3e5111
From: Peter Krempa <pkrempa@redhat.com>
3e5111
Date: Fri, 28 Apr 2017 10:45:16 +0200
3e5111
Subject: [PATCH] qemu: process: Clean automatic NUMA/cpu pinning information
3e5111
 on shutdown
3e5111
3e5111
Clean the stale data after shutting down the VM. Otherwise the data
3e5111
would be leaked on next VM start. This happens due to the fact that the
3e5111
private data object is not freed on destroy of the VM.
3e5111
3e5111
(cherry picked from commit 1730cdc665a499afc28683a4ce21493f967411b7)
3e5111
https://bugzilla.redhat.com/show_bug.cgi?id=1445627
3e5111
3e5111
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3e5111
---
3e5111
 src/qemu/qemu_process.c | 6 ++++++
3e5111
 1 file changed, 6 insertions(+)
3e5111
3e5111
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
3e5111
index 027c831e6..5d2d0662b 100644
3e5111
--- a/src/qemu/qemu_process.c
3e5111
+++ b/src/qemu/qemu_process.c
3e5111
@@ -6433,6 +6433,12 @@ void qemuProcessStop(virQEMUDriverPtr driver,
3e5111
     priv->qemuCaps = NULL;
3e5111
     VIR_FREE(priv->pidfile);
3e5111
 
3e5111
+    /* remove automatic pinning data */
3e5111
+    virBitmapFree(priv->autoNodeset);
3e5111
+    priv->autoNodeset = NULL;
3e5111
+    virBitmapFree(priv->autoCpuset);
3e5111
+    priv->autoCpuset = NULL;
3e5111
+
3e5111
     /* The "release" hook cleans up additional resources */
3e5111
     if (virHookPresent(VIR_HOOK_DRIVER_QEMU)) {
3e5111
         char *xml = qemuDomainDefFormatXML(driver, vm->def, 0);
3e5111
-- 
3e5111
2.12.2
3e5111