diff options
author | Laurent Vivier <lvivier@redhat.com> | 2017-04-12 15:53:11 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2017-04-21 12:25:40 +0200 |
commit | e8199e4895d34136735dea7e628d0de1a5afb630 (patch) | |
tree | b09018e5bda04aead89b6077d9d21dddbfd1b889 /hw/virtio/virtio-rng.c | |
parent | 66103a5796d0003cb198c25d783dcdc1596aef1f (diff) | |
download | qemu-e8199e4895d34136735dea7e628d0de1a5afb630.zip qemu-e8199e4895d34136735dea7e628d0de1a5afb630.tar.gz qemu-e8199e4895d34136735dea7e628d0de1a5afb630.tar.bz2 |
migration: don't close a file descriptor while it can be in use
If we close the QEMUFile descriptor in process_incoming_migration_co()
while it has been stopped by an error, the postcopy_ram_listen_thread()
can try to continue to use it. And as the memory has been freed
it is working with an invalid pointer and crashes.
Fix this by releasing the memory after having managed the error
case (which, in fact, calls exit())
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Amit Shah <amit@kernel.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'hw/virtio/virtio-rng.c')
0 files changed, 0 insertions, 0 deletions