render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
9119d9
From f600e269cc7f2330dba96e5c89d68bde89063beb Mon Sep 17 00:00:00 2001
9119d9
Message-Id: <f600e269cc7f2330dba96e5c89d68bde89063beb@dist-git>
9119d9
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
9119d9
Date: Mon, 29 Sep 2014 14:01:40 +0200
9119d9
Subject: [PATCH] Fix crash cpu_shares change event crash on domain startup
9119d9
9119d9
Introduced by commit 0dce260.
9119d9
9119d9
qemuDomainEventQueue was called with qemuDomainObjPrivatePtr instead
9119d9
of virQEMUDriverPtr.
9119d9
9119d9
https://bugzilla.redhat.com/show_bug.cgi?id=1147494
9119d9
(cherry picked from commit e26bbf49cc051b5d5c2a86c572f55953e617e872)
9119d9
9119d9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9119d9
---
9119d9
 src/qemu/qemu_cgroup.c | 7 ++++---
9119d9
 1 file changed, 4 insertions(+), 3 deletions(-)
9119d9
9119d9
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
9119d9
index 8819943..bd22b7f 100644
9119d9
--- a/src/qemu/qemu_cgroup.c
9119d9
+++ b/src/qemu/qemu_cgroup.c
9119d9
@@ -674,7 +674,8 @@ qemuSetupCpusetCgroup(virDomainObjPtr vm,
9119d9
 
9119d9
 
9119d9
 static int
9119d9
-qemuSetupCpuCgroup(virDomainObjPtr vm)
9119d9
+qemuSetupCpuCgroup(virQEMUDriverPtr driver,
9119d9
+                   virDomainObjPtr vm)
9119d9
 {
9119d9
     qemuDomainObjPrivatePtr priv = vm->privateData;
9119d9
     virObjectEventPtr event = NULL;
9119d9
@@ -711,7 +712,7 @@ qemuSetupCpuCgroup(virDomainObjPtr vm)
9119d9
         }
9119d9
 
9119d9
         if (event)
9119d9
-            qemuDomainEventQueue(vm->privateData, event);
9119d9
+            qemuDomainEventQueue(driver, event);
9119d9
     }
9119d9
 
9119d9
     return 0;
9119d9
@@ -845,7 +846,7 @@ qemuSetupCgroup(virQEMUDriverPtr driver,
9119d9
     if (qemuSetupMemoryCgroup(vm) < 0)
9119d9
         goto cleanup;
9119d9
 
9119d9
-    if (qemuSetupCpuCgroup(vm) < 0)
9119d9
+    if (qemuSetupCpuCgroup(driver, vm) < 0)
9119d9
         goto cleanup;
9119d9
 
9119d9
     if (qemuSetupCpusetCgroup(vm, nodemask, caps) < 0)
9119d9
-- 
9119d9
2.1.2
9119d9