render / rpms / libvirt

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