[libvirt] [PATCH] qemu: bulk stats: typo in monitor handling

Martin Kletzander mkletzan at redhat.com
Thu Dec 11 09:42:15 UTC 2014


On Thu, Dec 11, 2014 at 08:44:09AM +0100, Francesco Romani wrote:
>A typo in qemuConnectGetAllDomainStats makes the code
>mark the monitor as available when qemuDomainObjBeginJob
>fails, instead of when it succeeds, as the correct flow
>requires.
>
>This patch fixes the check and updates the code documentation
>accordingly.
>
>Signed-off-by: Francesco Romani <fromani at redhat.com>
>---
> src/qemu/qemu_driver.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>

ACK && Pushed.  This needs to be back-ported as a part of CVE that I
just pushed the fix for yesterday.

Thanks,
Martin

>diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
>index 830fca7..129e10c 100644
>--- a/src/qemu/qemu_driver.c
>+++ b/src/qemu/qemu_driver.c
>@@ -18745,9 +18745,12 @@ qemuConnectGetAllDomainStats(virConnectPtr conn,
>         }
>
>         if (HAVE_JOB(privflags) &&
>-            qemuDomainObjBeginJob(driver, dom, QEMU_JOB_QUERY) < 0)
>-            /* As it was never requested. Gather as much as possible anyway. */
>+            qemuDomainObjBeginJob(driver, dom, QEMU_JOB_QUERY) == 0)
>             domflags |= QEMU_DOMAIN_STATS_HAVE_JOB;
>+        /*
>+         * else: as it was never requested.
>+         * Gather as much as possible anyway.
>+         */
>
>         if (qemuDomainGetStats(conn, dom, stats, &tmp, domflags) < 0)
>             goto endjob;
>--
>1.9.3
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141211/b9d42cce/attachment-0001.sig>


More information about the libvir-list mailing list