[Pkg-libvirt-commits] [libvirt] 02/10: qemu: bulk stats: Fix logic in monitor handling
Guido Guenther
agx at moszumanska.debian.org
Wed Dec 24 10:14:42 UTC 2014
This is an automated email from the git hooks/post-receive script.
agx pushed a commit to annotated tag debian/1.2.9-7
in repository libvirt.
commit d0085e0bf2c9ad96a1f239f38d0e7be6c4540586
Author: Guido Günther <agx at sigxcpu.org>
Date: Wed Dec 24 09:27:10 2014 +0100
qemu: bulk stats: Fix logic in monitor handling
---
...-bulk-stats-Fix-logic-in-monitor-handling.patch | 36 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 37 insertions(+)
diff --git a/debian/patches/qemu-bulk-stats-Fix-logic-in-monitor-handling.patch b/debian/patches/qemu-bulk-stats-Fix-logic-in-monitor-handling.patch
new file mode 100644
index 0000000..d9400bd
--- /dev/null
+++ b/debian/patches/qemu-bulk-stats-Fix-logic-in-monitor-handling.patch
@@ -0,0 +1,36 @@
+From: Francesco Romani <fromani at redhat.com>
+Date: Thu, 11 Dec 2014 08:44:09 +0100
+Subject: qemu: bulk stats: Fix logic in monitor handling
+
+A logic bug 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.
+
+Broken by commit 57023c0a3af4af1c547189c1f6712ed5edeb0c0b.
+
+Signed-off-by: Francesco Romani <fromani at redhat.com>
+(cherry picked from commit cb104ef734dfea12cb8826dba7e2c98912c4b7e1)
+Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
+---
+ src/qemu/qemu_driver.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
+index 14a1ae9..048ded9 100644
+--- a/src/qemu/qemu_driver.c
++++ b/src/qemu/qemu_driver.c
+@@ -18153,9 +18153,9 @@ 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: without a job it's still possible to gather some data */
+
+ if (qemuDomainGetStats(conn, dom, stats, &tmp, domflags) < 0)
+ goto endjob;
diff --git a/debian/patches/series b/debian/patches/series
index fb49ac7..0b915d0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -17,3 +17,4 @@ qemu-use-systemd-s-TerminateMachine-to-kill-all-proc.patch
security/CVE-2014-7823-dumpxml-security-hole-with-migratable-.patch
util-Prepare-URI-formatting-for-libxml2-2.9.2.patch
security/CVE-2014-8131-Fix-possible-deadlock-and-segfault-in-.patch
+qemu-bulk-stats-Fix-logic-in-monitor-handling.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libvirt.git
More information about the Pkg-libvirt-commits
mailing list