]> git.proxmox.com Git - mirror_qemu.git/commitdiff
migration/block-dirty-bitmap: fix dirty_bitmap_load
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Wed, 30 May 2018 11:24:24 +0000 (14:24 +0300)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 18 Jul 2018 16:43:20 +0000 (11:43 -0500)
dirty_bitmap_load_header return code is obtained but not handled. Fix
this.

Bug was introduced in b35ebdf076d697bc
"migration: add postcopy migration of dirty bitmaps" with the whole
function.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20180530112424.204835-1-vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
(cherry picked from commit a36f6ff46f115672cf86d0e1e7cdb1c2fa4d304b)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
migration/block-dirty-bitmap.c

index 8819aabe3a05bde183c5c028b51feccf22ac07a0..2c541c985d415dd77b4ad66360aa8acc9b0a9d5a 100644 (file)
@@ -672,6 +672,9 @@ static int dirty_bitmap_load(QEMUFile *f, void *opaque, int version_id)
 
     do {
         ret = dirty_bitmap_load_header(f, &s);
+        if (ret < 0) {
+            return ret;
+        }
 
         if (s.flags & DIRTY_BITMAP_MIG_FLAG_START) {
             ret = dirty_bitmap_load_start(f, &s);