9119d9
From d641536fa5aa5f52795f72c346d743939034ef0e Mon Sep 17 00:00:00 2001
9119d9
Message-Id: <d641536fa5aa5f52795f72c346d743939034ef0e@dist-git>
9119d9
From: Jiri Denemark <jdenemar@redhat.com>
9119d9
Date: Thu, 20 Nov 2014 13:09:16 +0100
9119d9
Subject: [PATCH] qemu: Fix crash in tunnelled migration
9119d9
9119d9
Any attempt to start a tunnelled migration with libvirtd that supports
9119d9
RDMA migration (specifically commit v1.2.8-226-ged22a47) crashes
9119d9
libvirtd on the destination host.
9119d9
9119d9
The crash is inevitable because qemuMigrationPrepareAny is always called
9119d9
with NULL protocol in case of tunnelled migration.
9119d9
9119d9
https://bugzilla.redhat.com/show_bug.cgi?id=1147331
9119d9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9119d9
(cherry picked from commit 52691f99fa016ac46c9546c37706e57a5180d4c6)
9119d9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9119d9
---
9119d9
 src/qemu/qemu_migration.c | 2 +-
9119d9
 1 file changed, 1 insertion(+), 1 deletion(-)
9119d9
9119d9
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
9119d9
index 7745d77..4b701d3 100644
9119d9
--- a/src/qemu/qemu_migration.c
9119d9
+++ b/src/qemu/qemu_migration.c
9119d9
@@ -2715,7 +2715,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
9119d9
                                        QEMU_MIGRATION_COOKIE_NBD)))
9119d9
         goto cleanup;
9119d9
 
9119d9
-    if (STREQ(protocol, "rdma") && !vm->def->mem.hard_limit) {
9119d9
+    if (STREQ_NULLABLE(protocol, "rdma") && !vm->def->mem.hard_limit) {
9119d9
         virReportError(VIR_ERR_OPERATION_INVALID, "%s",
9119d9
                        _("cannot start RDMA migration with no memory hard "
9119d9
                          "limit set"));
9119d9
-- 
9119d9
2.1.3
9119d9