]> git.proxmox.com Git - mirror_qemu.git/commitdiff
migration/block-dirty-bitmap: fix dirty_bitmap_mig_before_vm_start
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Mon, 27 Jul 2020 19:42:22 +0000 (22:42 +0300)
committerEric Blake <eblake@redhat.com>
Mon, 27 Jul 2020 20:39:59 +0000 (15:39 -0500)
Using the _locked version of bdrv_enable_dirty_bitmap to bypass locking
is wrong as we do not already own the mutex.  Moreover, the adjacent
call to bdrv_dirty_bitmap_enable_successor grabs the mutex.

Fixes: 58f72b965e9e1q
Cc: qemu-stable@nongnu.org # v3.0
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200727194236.19551-8-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
migration/block-dirty-bitmap.c

index b0dbf9eeed4382564b6bf911be0de2fcee1d2453..0739f1259e05c62b5781d6837311f00afbdaa021 100644 (file)
@@ -566,7 +566,7 @@ void dirty_bitmap_mig_before_vm_start(void)
         DirtyBitmapLoadBitmapState *b = item->data;
 
         if (b->migrated) {
-            bdrv_enable_dirty_bitmap_locked(b->bitmap);
+            bdrv_enable_dirty_bitmap(b->bitmap);
         } else {
             bdrv_dirty_bitmap_enable_successor(b->bitmap);
         }