migration: Take bitmap mutex when completing ram migration
authorPeter Xu <peterx@redhat.com>
Tue, 11 Oct 2022 21:55:45 +0000 (17:55 -0400)
committerJuan Quintela <quintela@redhat.com>
Thu, 15 Dec 2022 09:30:37 +0000 (10:30 +0100)
commitc13221b56faaaf732de95d05a7742c1913363b48
tree335721133e2ec7dd2dd824c664c6c3de3a0cff42
parenta4dbaf8eedbb81060ce6963f118442f7aa0ba61e
migration: Take bitmap mutex when completing ram migration

Any call to ram_find_and_save_block() needs to take the bitmap mutex.  We
used to not take it for most of ram_save_complete() because we thought
we're the only one left using the bitmap, but it's not true after the
preempt full patchset applied, since the return path can be taking it too.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/ram.c