]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Fix crash in tunnelled migration
authorJiri Denemark <jdenemar@redhat.com>
Thu, 20 Nov 2014 12:09:16 +0000 (13:09 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 20 Nov 2014 12:22:20 +0000 (13:22 +0100)
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>
src/qemu/qemu_migration.c

index 100600e2d646410d41f4a26df2ba0ee2a6b0f756..89313dff1ab0e2d86b9e7dc92649852c87d9793e 100644 (file)
@@ -2707,7 +2707,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
                                        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"));