[libvirt] [PATCH] qemu: Fix crash on incoming migration

Jiri Denemark posted 1 patch 4 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/b7b98a0909cd6a800a5a4d540030e00a5d60f75e.1565711432.git.jdenemar@redhat.com
Test syntax-check passed
src/qemu/qemu_migration_cookie.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

[libvirt] [PATCH] qemu: Fix crash on incoming migration

Posted by Jiri Denemark 4 days ago
In the first stage of incoming migration (qemuMigrationDstPrepareAny) we
call qemuMigrationEatCookie when there's no vm object created yet and
thus we don't have any private data to pass.

Broken by me in commit v5.6.0-109-gbf15b145ec.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/qemu/qemu_migration_cookie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index da5bc8d05f..25d3fecd74 100644
--- a/src/qemu/qemu_migration_cookie.c
+++ b/src/qemu/qemu_migration_cookie.c
@@ -1507,7 +1507,7 @@ qemuMigrationEatCookie(virQEMUDriverPtr driver,
     if (cookiein && cookieinlen &&
         qemuMigrationCookieXMLParseStr(mig,
                                        driver,
-                                       priv->qemuCaps,
+                                       priv ? priv->qemuCaps : NULL,
                                        cookiein,
                                        flags) < 0)
         goto error;
-- 
2.22.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] qemu: Fix crash on incoming migration

Posted by Erik Skultety 4 days ago
On Tue, Aug 13, 2019 at 05:50:32PM +0200, Jiri Denemark wrote:
> In the first stage of incoming migration (qemuMigrationDstPrepareAny) we
> call qemuMigrationEatCookie when there's no vm object created yet and
> thus we don't have any private data to pass.
>
> Broken by me in commit v5.6.0-109-gbf15b145ec.
>
> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
> ---
Reviewed-by: Erik Skultety <eskultet@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list