cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

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

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