From e26bbf49cc051b5d5c2a86c572f55953e617e872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Mon, 29 Sep 2014 13:47:44 +0200 Subject: [PATCH] Fix crash cpu_shares change event crash on domain startup Introduced by commit 0dce260. qemuDomainEventQueue was called with qemuDomainObjPrivatePtr instead of virQEMUDriverPtr. https://bugzilla.redhat.com/show_bug.cgi?id=1147494 --- src/qemu/qemu_cgroup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index 8819943238..bd22b7fbd6 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -674,7 +674,8 @@ qemuSetupCpusetCgroup(virDomainObjPtr vm, static int -qemuSetupCpuCgroup(virDomainObjPtr vm) +qemuSetupCpuCgroup(virQEMUDriverPtr driver, + virDomainObjPtr vm) { qemuDomainObjPrivatePtr priv = vm->privateData; virObjectEventPtr event = NULL; @@ -711,7 +712,7 @@ qemuSetupCpuCgroup(virDomainObjPtr vm) } if (event) - qemuDomainEventQueue(vm->privateData, event); + qemuDomainEventQueue(driver, event); } return 0; @@ -845,7 +846,7 @@ qemuSetupCgroup(virQEMUDriverPtr driver, if (qemuSetupMemoryCgroup(vm) < 0) goto cleanup; - if (qemuSetupCpuCgroup(vm) < 0) + if (qemuSetupCpuCgroup(driver, vm) < 0) goto cleanup; if (qemuSetupCpusetCgroup(vm, nodemask, caps) < 0)