migration: avoid segmentfault when take a snapshot of a VM which being migrated
commit3d63da16fbcd05405efd5946000cdb45474a9bad
authorJia Lina <jialina01@baidu.com>
Fri, 26 Oct 2018 08:36:20 +0000 (26 16:36 +0800)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Wed, 31 Oct 2018 09:38:59 +0000 (31 09:38 +0000)
treeeae180d6f698df45e85d62b99c1a41cc2f87bd2a
parentea3b23e5ffc4b937958ba54b006a2a5e2e664f12
migration: avoid segmentfault when take a snapshot of a VM which being migrated

During an active background migration, snapshot will trigger a
segmentfault. As snapshot clears the "current_migration" struct
and updates "to_dst_file" before it finds out that there is a
migration task, Migration accesses the null pointer in
"current_migration" struct and qemu crashes eventually.

Signed-off-by: Jia Lina <jialina01@baidu.com>
Signed-off-by: Chai Wen <chaiwen@baidu.com>
Signed-off-by: Zhang Yu <zhangyu31@baidu.com>
Message-Id: <20181026083620.10172-1-jialina01@baidu.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
migration/migration.c
migration/migration.h
migration/savevm.c