- qemu: Fix crash in tunnelled migration

52691f99-qemu-mig-crash.patch
  boo#908008

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=424
This commit is contained in:
James Fehlig 2014-12-03 12:25:32 +00:00 committed by Git OBS Bridge
parent d6a22feac8
commit 69a5f4bf9f
7 changed files with 68 additions and 42 deletions

View File

@ -13,11 +13,11 @@ The changed command also works on older versions of iproute2, just the
src/util/virnetdevveth.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/util/virnetdevveth.c b/src/util/virnetdevveth.c
index e9d6f9c..ad30e1d 100644
--- a/src/util/virnetdevveth.c
+++ b/src/util/virnetdevveth.c
@@ -89,7 +89,7 @@ static int virNetDevVethGetFreeNum(int startDev)
Index: libvirt-1.2.10/src/util/virnetdevveth.c
===================================================================
--- libvirt-1.2.10.orig/src/util/virnetdevveth.c
+++ libvirt-1.2.10/src/util/virnetdevveth.c
@@ -89,7 +89,7 @@ static int virNetDevVethGetFreeNum(int s
* @veth2: pointer to return name for container end of veth pair
*
* Creates a veth device pair using the ip command:
@ -26,7 +26,7 @@ index e9d6f9c..ad30e1d 100644
* If veth1 points to NULL on entry, it will be a valid interface on
* return. veth2 should point to NULL on entry.
*
@@ -146,7 +146,7 @@ int virNetDevVethCreate(char** veth1, char** veth2)
@@ -146,7 +146,7 @@ int virNetDevVethCreate(char** veth1, ch
}
cmd = virCommandNew("ip");
@ -35,6 +35,3 @@ index e9d6f9c..ad30e1d 100644
*veth1 ? *veth1 : veth1auto,
"type", "veth", "peer", "name",
*veth2 ? *veth2 : veth2auto,
--
2.1.2

View File

@ -0,0 +1,29 @@
commit 52691f99fa016ac46c9546c37706e57a5180d4c6
Author: Jiri Denemark <jdenemar@redhat.com>
Date: Thu Nov 20 13:09:16 2014 +0100
qemu: Fix crash in tunnelled migration
Any attempt to start a tunnelled migration with libvirtd that supports
RDMA migration (specifically commit v1.2.8-226-ged22a47) crashes
libvirtd on the destination host.
The crash is inevitable because qemuMigrationPrepareAny is always called
with NULL protocol in case of tunnelled migration.
https://bugzilla.redhat.com/show_bug.cgi?id=1147331
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Index: libvirt-1.2.10/src/qemu/qemu_migration.c
===================================================================
--- libvirt-1.2.10.orig/src/qemu/qemu_migration.c
+++ libvirt-1.2.10/src/qemu/qemu_migration.c
@@ -2688,7 +2688,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr
QEMU_MIGRATION_COOKIE_NBD)))
goto cleanup;
- if (STREQ(protocol, "rdma") && !vm->def->mem.hard_limit) {
+ if (STREQ_NULLABLE(protocol, "rdma") && !vm->def->mem.hard_limit) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("cannot start RDMA migration with no memory hard "
"limit set"));

View File

@ -17,11 +17,11 @@ two passes:
src/lxc/lxc_container.c | 77 ++++++++++++++++++++++++++++++++++---------------
2 files changed, 54 insertions(+), 24 deletions(-)
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index d428451..dcb30bc 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -821,6 +821,7 @@ struct _virDomainFSDef {
Index: libvirt-1.2.10/src/conf/domain_conf.h
===================================================================
--- libvirt-1.2.10.orig/src/conf/domain_conf.h
+++ libvirt-1.2.10/src/conf/domain_conf.h
@@ -814,6 +814,7 @@ struct _virDomainFSDef {
virDomainDeviceInfo info;
unsigned long long space_hard_limit; /* in bytes */
unsigned long long space_soft_limit; /* in bytes */
@ -29,11 +29,11 @@ index d428451..dcb30bc 100644
};
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index db823d6..12f3a41 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -608,6 +608,48 @@ static int lxcContainerUnmountSubtree(const char *prefix,
Index: libvirt-1.2.10/src/lxc/lxc_container.c
===================================================================
--- libvirt-1.2.10.orig/src/lxc/lxc_container.c
+++ libvirt-1.2.10/src/lxc/lxc_container.c
@@ -609,6 +609,48 @@ static int lxcContainerUnmountSubtree(co
return ret;
}
@ -82,7 +82,7 @@ index db823d6..12f3a41 100644
static int lxcContainerPrepareRoot(virDomainDefPtr def,
virDomainFSDefPtr root,
@@ -634,6 +676,9 @@ static int lxcContainerPrepareRoot(virDomainDefPtr def,
@@ -635,6 +677,9 @@ static int lxcContainerPrepareRoot(virDo
return -1;
}
@ -92,7 +92,7 @@ index db823d6..12f3a41 100644
if (virAsprintf(&dst, "%s/%s.root",
LXC_STATE_DIR, def->name) < 0)
return -1;
@@ -1552,6 +1597,9 @@ static int lxcContainerMountAllFS(virDomainDefPtr vmDef,
@@ -1555,6 +1600,9 @@ static int lxcContainerMountAllFS(virDom
if (STREQ(vmDef->fss[i]->dst, "/"))
continue;
@ -102,7 +102,7 @@ index db823d6..12f3a41 100644
if (lxcContainerUnmountSubtree(vmDef->fss[i]->dst,
false) < 0)
return -1;
@@ -1735,37 +1783,18 @@ static int lxcContainerSetupPivotRoot(virDomainDefPtr vmDef,
@@ -1738,37 +1786,18 @@ static int lxcContainerSetupPivotRoot(vi
return ret;
}
@ -144,7 +144,7 @@ index db823d6..12f3a41 100644
}
VIR_DEBUG("Resolved all filesystem symlinks");
@@ -2106,7 +2135,7 @@ static int lxcContainerChild(void *data)
@@ -2107,7 +2136,7 @@ static int lxcContainerChild(void *data)
goto cleanup;
}
@ -153,6 +153,3 @@ index db823d6..12f3a41 100644
goto cleanup;
VIR_DEBUG("Setting up pivot");
--
2.1.2

View File

@ -10,11 +10,11 @@ needs not to choke on path in /etc/libvirt-sandbox/services.
src/security/virt-aa-helper.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index 81f9f40..f273e09 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -571,7 +571,8 @@ valid_path(const char *path, const bool readonly)
Index: libvirt-1.2.10/src/security/virt-aa-helper.c
===================================================================
--- libvirt-1.2.10.orig/src/security/virt-aa-helper.c
+++ libvirt-1.2.10/src/security/virt-aa-helper.c
@@ -571,7 +571,8 @@ valid_path(const char *path, const bool
};
/* override the above with these */
const char * const override[] = {
@ -24,6 +24,3 @@ index 81f9f40..f273e09 100644
};
if (path == NULL) {
--
2.1.2

View File

@ -18,11 +18,11 @@ loose the access to the source folder.
src/lxc/lxc_container.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 12f3a41..334a1df 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -1597,11 +1597,15 @@ static int lxcContainerMountAllFS(virDomainDefPtr vmDef,
Index: libvirt-1.2.10/src/lxc/lxc_container.c
===================================================================
--- libvirt-1.2.10.orig/src/lxc/lxc_container.c
+++ libvirt-1.2.10/src/lxc/lxc_container.c
@@ -1600,11 +1600,15 @@ static int lxcContainerMountAllFS(virDom
if (STREQ(vmDef->fss[i]->dst, "/"))
continue;
@ -40,6 +40,3 @@ index 12f3a41..334a1df 100644
return -1;
if (lxcContainerMountFS(vmDef->fss[i], sec_mount_options) < 0)
--
2.1.2

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Dec 3 05:01:13 MST 2014 - jfehlig@suse.com
- qemu: Fix crash in tunnelled migration
52691f99-qemu-mig-crash.patch
boo#908008
-------------------------------------------------------------------
Thu Nov 20 11:56:16 UTC 2014 - cbosdonnat@suse.com

View File

@ -440,6 +440,7 @@ Patch2: c264eea-virt-aa-helper-sandbox.patch
Patch3: 433b427-iplink-name.patch
Patch4: 72fecf1-lxc-resolve-symlinks.patch
Patch5: e50457d-lxc-unmount-check.patch
Patch6: 52691f99-qemu-mig-crash.patch
# Patches pending upstream review
# Need to go upstream
Patch150: xen-name-for-devid.patch
@ -978,6 +979,7 @@ Provides a dissector for the libvirt RPC protocol to help debugging it.
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch150 -p1
%patch151 -p1
%patch152 -p1