Blame SOURCES/kvm-migration-cleanup-in-error-paths-in-loadvm.patch

7711c0
From 5496cb7128658bd4b3cb24ce741bba4df3c09656 Mon Sep 17 00:00:00 2001
7711c0
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
7711c0
Date: Mon, 19 Nov 2018 16:19:21 +0100
7711c0
Subject: [PATCH 22/22] migration: cleanup in error paths in loadvm
7711c0
7711c0
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
7711c0
Message-id: <20181119161921.15191-3-dgilbert@redhat.com>
7711c0
Patchwork-id: 83049
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 2/2] migration: cleanup in error paths in loadvm
7711c0
Bugzilla: 1608877
7711c0
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
7711c0
RH-Acked-by: Peter Xu <peterx@redhat.com>
7711c0
RH-Acked-by: Pankaj Gupta <pagupta@redhat.com>
7711c0
7711c0
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
7711c0
7711c0
There's a couple of error paths in qemu_loadvm_state
7711c0
which happen early on but after we've initialised the
7711c0
load state; that needs to be cleaned up otherwise
7711c0
we can hit asserts if the state gets reinitialised later.
7711c0
7711c0
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
7711c0
Message-Id: <20180914170430.54271-3-dgilbert@redhat.com>
7711c0
Reviewed-by: Peter Xu <peterx@redhat.com>
7711c0
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
7711c0
(cherry picked from commit 096c83b7219c5a2145435afc8be750281e9cb447)
7711c0
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
7711c0
(cherry picked from commit 020674a9569df103bdd6a8cef29ce8013c92a8b8)
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 migration/savevm.c | 2 ++
7711c0
 1 file changed, 2 insertions(+)
7711c0
7711c0
diff --git a/migration/savevm.c b/migration/savevm.c
7711c0
index 7a5d9ff..e5d57fa 100644
7711c0
--- a/migration/savevm.c
7711c0
+++ b/migration/savevm.c
7711c0
@@ -2146,11 +2146,13 @@ int qemu_loadvm_state(QEMUFile *f)
7711c0
     if (migrate_get_current()->send_configuration) {
7711c0
         if (qemu_get_byte(f) != QEMU_VM_CONFIGURATION) {
7711c0
             error_report("Configuration section missing");
7711c0
+            qemu_loadvm_state_cleanup();
7711c0
             return -EINVAL;
7711c0
         }
7711c0
         ret = vmstate_load_state(f, &vmstate_configuration, &savevm_state, 0);
7711c0
 
7711c0
         if (ret) {
7711c0
+            qemu_loadvm_state_cleanup();
7711c0
             return ret;
7711c0
         }
7711c0
     }
7711c0
-- 
7711c0
1.8.3.1
7711c0