99cbc7
From 843c097b76de7b49feca15e35189419ecb184cae Mon Sep 17 00:00:00 2001
99cbc7
Message-Id: <843c097b76de7b49feca15e35189419ecb184cae@dist-git>
99cbc7
From: Jiri Denemark <jdenemar@redhat.com>
99cbc7
Date: Fri, 16 Aug 2019 14:52:37 +0200
99cbc7
Subject: [PATCH] qemu: Fix crash on incoming migration
99cbc7
MIME-Version: 1.0
99cbc7
Content-Type: text/plain; charset=UTF-8
99cbc7
Content-Transfer-Encoding: 8bit
99cbc7
99cbc7
In the first stage of incoming migration (qemuMigrationDstPrepareAny) we
99cbc7
call qemuMigrationEatCookie when there's no vm object created yet and
99cbc7
thus we don't have any private data to pass.
99cbc7
99cbc7
Broken by me in commit v5.6.0-109-gbf15b145ec.
99cbc7
99cbc7
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
99cbc7
Reviewed-by: Erik Skultety <eskultet@redhat.com>
99cbc7
(cherry picked from commit 69b1ecde25aef6545cc077fe3c92ba19f1623828)
99cbc7
99cbc7
https://bugzilla.redhat.com/show_bug.cgi?id=1731783
99cbc7
99cbc7
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
99cbc7
Message-Id: <7e7b2059ff2bcbc082c3fdd8f6723b1771db289b.1565959866.git.jdenemar@redhat.com>
99cbc7
Reviewed-by: Ján Tomko <jtomko@redhat.com>
99cbc7
---
99cbc7
 src/qemu/qemu_migration_cookie.c | 2 +-
99cbc7
 1 file changed, 1 insertion(+), 1 deletion(-)
99cbc7
99cbc7
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
99cbc7
index b9933b9e04..8c8df89b1b 100644
99cbc7
--- a/src/qemu/qemu_migration_cookie.c
99cbc7
+++ b/src/qemu/qemu_migration_cookie.c
99cbc7
@@ -1503,7 +1503,7 @@ qemuMigrationEatCookie(virQEMUDriverPtr driver,
99cbc7
     if (cookiein && cookieinlen &&
99cbc7
         qemuMigrationCookieXMLParseStr(mig,
99cbc7
                                        driver,
99cbc7
-                                       priv->qemuCaps,
99cbc7
+                                       priv ? priv->qemuCaps : NULL,
99cbc7
                                        cookiein,
99cbc7
                                        flags) < 0)
99cbc7
         goto error;
99cbc7
-- 
99cbc7
2.22.1
99cbc7