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