]> xenbits.xensource.com Git - libvirt.git/commit
qemu_migration: Avoid writing to freed memory
authorJiri Denemark <jdenemar@redhat.com>
Thu, 2 Aug 2018 14:56:02 +0000 (16:56 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 13 Aug 2018 09:29:09 +0000 (11:29 +0200)
commitdddcb601ebf97ef222a03bb27b2357e831e8a0cc
treedc5bee79576cc0d25366b93e15e9fa290a0742cf
parente41bfae562d52de4efea469570c4ac618d9c82b0
qemu_migration: Avoid writing to freed memory

When a domain is killed on the source host while it is being migrated
and libvirtd is waiting for the migration to finish (waiting for the
domain condition in qemuMigrationSrcWaitForCompletion), the run-time
state including priv->job.current may already be freed once
virDomainObjWait returns with -1. Thus the priv->job.current pointer
cached in jobInfo is no longer valid and setting jobInfo->status may
crash the daemon.

https://bugzilla.redhat.com/show_bug.cgi?id=1593137

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_migration.c