]> git.proxmox.com Git - mirror_qemu.git/commit - dump/dump.c
dump-guest-memory: Block live migration
authorPeter Xu <peterx@redhat.com>
Wed, 22 Sep 2021 16:20:09 +0000 (12:20 -0400)
committerJuan Quintela <quintela@redhat.com>
Mon, 1 Nov 2021 21:56:44 +0000 (22:56 +0100)
commitb7bc6b182883bb3097dde2a25d041f28bde2b89c
treee5de4f3582754b812fd6f953c8206ec6a30ddac9
parent60fd680193119e7e4d50eccff7b55a0aadc934ab
dump-guest-memory: Block live migration

Both dump-guest-memory and live migration caches vm state at the beginning.
Either of them entering the other one will cause race on the vm state, and even
more severe on that (please refer to the crash report in the bug link).

Let's block live migration in dump-guest-memory, and that'll also block
dump-guest-memory if it detected that we're during a live migration.

Side note: migrate_del_blocker() can be called even if the blocker is not
inserted yet, so it's safe to unconditionally delete that blocker in
dump_cleanup (g_slist_remove allows no-entry-found case).

Suggested-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1996609
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
dump/dump.c