Blame SOURCES/kvm-migration-block-dirty-bitmap-fix-dirty_bitmap_load.patch

ae23c9
From d8d7edf965db996cd6105cc9d550374af9bb6521 Mon Sep 17 00:00:00 2001
ae23c9
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
ae23c9
Date: Fri, 22 Jun 2018 19:00:05 +0200
ae23c9
Subject: [PATCH 17/21] migration/block-dirty-bitmap: fix dirty_bitmap_load
ae23c9
ae23c9
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
ae23c9
Message-id: <20180801135522.11658-19-dgilbert@redhat.com>
ae23c9
Patchwork-id: 81573
ae23c9
O-Subject: [qemu-kvm RHEL8/virt212 PATCH 18/18] migration/block-dirty-bitmap: fix dirty_bitmap_load
ae23c9
Bugzilla: 1594384
ae23c9
RH-Acked-by: Peter Xu <peterx@redhat.com>
ae23c9
RH-Acked-by: John Snow <jsnow@redhat.com>
ae23c9
RH-Acked-by: Juan Quintela <quintela@redhat.com>
ae23c9
ae23c9
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
ae23c9
ae23c9
dirty_bitmap_load_header return code is obtained but not handled. Fix
ae23c9
this.
ae23c9
ae23c9
Bug was introduced in b35ebdf076d697bc
ae23c9
"migration: add postcopy migration of dirty bitmaps" with the whole
ae23c9
function.
ae23c9
ae23c9
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
ae23c9
Message-Id: <20180530112424.204835-1-vsementsov@virtuozzo.com>
ae23c9
Reviewed-by: Eric Blake <eblake@redhat.com>
ae23c9
Reviewed-by: John Snow <jsnow@redhat.com>
ae23c9
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
ae23c9
(cherry picked from commit a36f6ff46f115672cf86d0e1e7cdb1c2fa4d304b)
ae23c9
---
ae23c9
 migration/block-dirty-bitmap.c | 3 +++
ae23c9
 1 file changed, 3 insertions(+)
ae23c9
ae23c9
diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c
ae23c9
index b3b31ba..fefbc6a 100644
ae23c9
--- a/migration/block-dirty-bitmap.c
ae23c9
+++ b/migration/block-dirty-bitmap.c
ae23c9
@@ -672,6 +672,9 @@ static int dirty_bitmap_load(QEMUFile *f, void *opaque, int version_id)
ae23c9
 
ae23c9
     do {
ae23c9
         ret = dirty_bitmap_load_header(f, &s);
ae23c9
+        if (ret < 0) {
ae23c9
+            return ret;
ae23c9
+        }
ae23c9
 
ae23c9
         if (s.flags & DIRTY_BITMAP_MIG_FLAG_START) {
ae23c9
             ret = dirty_bitmap_load_start(f, &s);
ae23c9
-- 
ae23c9
1.8.3.1
ae23c9