summary refs log tree commit diff stats
path: root/include/hw/qdev-core.h
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2015-11-12 15:38:27 +0000
committerJuan Quintela <quintela@redhat.com>2015-11-12 17:55:27 +0100
commit389775d1f67b2c8f44f9473b1e5363735972e389 (patch)
treead1804bc9419188fea46330d038de3d3159e5b36 /include/hw/qdev-core.h
parenta54d340b9d0902fa73ff9e5541974b9b51fb1d45 (diff)
downloadfocaccia-qemu-389775d1f67b2c8f44f9473b1e5363735972e389.tar.gz
focaccia-qemu-389775d1f67b2c8f44f9473b1e5363735972e389.zip
migration_init: Fix lock initialisation/make it explicit
Peter reported a lock error on MacOS after my a82d593b
patch.

migrate_get_current does one-time initialisation of
a bunch of variables.
migrate_init does reinitialisation even on a 2nd
migrate after a cancel.

The problem here was that I'd initialised the mutex
in migrate_get_current, and the memset in migrate_init
corrupted it.

Remove the memset and replace it by explicit initialisation
of fields that need initialising; this also turns out to be simpler
than the old code that had to preserve some fields.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Fixes: a82d593b
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'include/hw/qdev-core.h')
0 files changed, 0 insertions, 0 deletions