From cd2a81947f3aa59025c924878014da3b3c00ed95191d25bfe3fb6e6186160377 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Mon, 18 Apr 2016 22:25:47 +0000 Subject: [PATCH 1/2] Add bug fixes found while testing SLES12 SP2 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=522 --- 03e8d5fb-qemu-perf-memory-corruption.patch | 33 + 6d8b6d28-mark-implicit-video-primary.patch | 914 +++++++++++++++++++++ libvirt.changes | 14 + libvirt.spec | 4 + 4 files changed, 965 insertions(+) create mode 100644 03e8d5fb-qemu-perf-memory-corruption.patch create mode 100644 6d8b6d28-mark-implicit-video-primary.patch diff --git a/03e8d5fb-qemu-perf-memory-corruption.patch b/03e8d5fb-qemu-perf-memory-corruption.patch new file mode 100644 index 0000000..fb8c955 --- /dev/null +++ b/03e8d5fb-qemu-perf-memory-corruption.patch @@ -0,0 +1,33 @@ +commit 03e8d5fb54c7c897225ed9ea56d83b894930f144 +Author: Peter Krempa +Date: Thu Apr 7 12:50:15 2016 +0200 + + qemu: perf: Fix crash/memory corruption on failed VM start + + The new perf code didn't bother to clear a pointer in 'priv' causing a + double free or other memory corruption goodness if a VM failed to start. + + Clear the pointer after freeing the memory. + + Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1324757 + +Index: libvirt-1.3.3/src/qemu/qemu_process.c +=================================================================== +--- libvirt-1.3.3.orig/src/qemu/qemu_process.c ++++ libvirt-1.3.3/src/qemu/qemu_process.c +@@ -3444,6 +3444,7 @@ qemuDomainPerfRestart(virDomainObjPtr vm + + cleanup: + virPerfFree(priv->perf); ++ priv->perf = NULL; + return -1; + } + +@@ -5959,6 +5960,7 @@ void qemuProcessStop(virQEMUDriverPtr dr + virCgroupFree(&priv->cgroup); + + virPerfFree(priv->perf); ++ priv->perf = NULL; + + qemuProcessRemoveDomainStatus(driver, vm); + diff --git a/6d8b6d28-mark-implicit-video-primary.patch b/6d8b6d28-mark-implicit-video-primary.patch new file mode 100644 index 0000000..24bf581 --- /dev/null +++ b/6d8b6d28-mark-implicit-video-primary.patch @@ -0,0 +1,914 @@ +commit 6d8b6d2847f31a3d7a234536c12b8feca751a02f +Author: Ján Tomko +Date: Mon Apr 11 14:26:06 2016 +0200 + + conf: also mark the implicit video as primary + + Commit 119cd06 started setting the primary bool for the first + user-specified video even if user omitted the 'primary' attribute. + + However this was done before the addition of the implicit device. + This broke startup of transient qemu domains with no