Skip to content
Snippets Groups Projects
  1. May 02, 2021
  2. Apr 07, 2021
  3. Apr 06, 2021
  4. Apr 01, 2021
  5. Mar 24, 2021
    • Vladimir Sementsov-Ogievskiy's avatar
      migration/block-dirty-bitmap: make incoming disabled bitmaps busy · 4290b483
      Vladimir Sementsov-Ogievskiy authored
      
      Incoming enabled bitmaps are busy, because we do
      bdrv_dirty_bitmap_create_successor() for them. But disabled bitmaps
      being migrated are not marked busy, and user can remove them during the
      incoming migration. Then we may crash in cancel_incoming_locked() when
      try to remove the bitmap that was already removed by user, like this:
      
       #0  qemu_mutex_lock_impl (mutex=0x5593d88c50d1, file=0x559680554b20
         "../block/dirty-bitmap.c", line=64) at ../util/qemu-thread-posix.c:77
       #1  bdrv_dirty_bitmaps_lock (bs=0x5593d88c0ee9)
         at ../block/dirty-bitmap.c:64
       #2  bdrv_release_dirty_bitmap (bitmap=0x5596810e9570)
         at ../block/dirty-bitmap.c:362
       #3  cancel_incoming_locked (s=0x559680be8208 <dbm_state+40>)
         at ../migration/block-dirty-bitmap.c:918
       #4  dirty_bitmap_load (f=0x559681d02b10, opaque=0x559680be81e0
         <dbm_state>, version_id=1) at ../migration/block-dirty-bitmap.c:1194
       #5  vmstate_load (f=0x559681d02b10, se=0x559680fb5810)
         at ../migration/savevm.c:908
       #6  qemu_loadvm_section_part_end (f=0x559681d02b10,
         mis=0x559680fb4a30) at ../migration/savevm.c:2473
       #7  qemu_loadvm_state_main (f=0x559681d02b10, mis=0x559680fb4a30)
         at ../migration/savevm.c:2626
       #8  postcopy_ram_listen_thread (opaque=0x0)
         at ../migration/savevm.c:1871
       #9  qemu_thread_start (args=0x5596817ccd10)
         at ../util/qemu-thread-posix.c:521
       #10 start_thread () at /lib64/libpthread.so.0
       #11 clone () at /lib64/libc.so.6
      
      Note bs pointer taken from bitmap: it's definitely bad aligned. That's
      because we are in use after free, bitmap is already freed.
      
      So, let's make disabled bitmaps (being migrated) busy during incoming
      migration.
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Message-Id: <20210322094906.5079-2-vsementsov@virtuozzo.com>
      4290b483
  6. Mar 18, 2021
  7. Mar 15, 2021
  8. Feb 12, 2021
  9. Feb 08, 2021
  10. Jan 28, 2021
  11. Jan 13, 2021
  12. Jan 08, 2021
  13. Jan 06, 2021
  14. Dec 19, 2020
    • Markus Armbruster's avatar
      migration: Replace migration's JSON writer by the general one · 3ddba9a9
      Markus Armbruster authored
      
      Commit 8118f095 "migration: Append JSON description of migration
      stream" needs a JSON writer.  The existing qobject_to_json() wasn't a
      good fit, because it requires building a QObject to convert.  Instead,
      migration got its very own JSON writer, in commit 190c882c "QJSON:
      Add JSON writer".  It tacitly limits numbers to int64_t, and strings
      contents to characters that don't need escaping, unlike
      qobject_to_json().
      
      The previous commit factored the JSON writer out of qobject_to_json().
      Replace migration's JSON writer by it.
      
      Cc: Juan Quintela <quintela@redhat.com>
      Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20201211171152.146877-17-armbru@redhat.com>
      Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      3ddba9a9
Loading