mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 15:52:55 +00:00
qemu: avoid closing fd more than once
If we migrate to fd, spec->fwdType is not MIGRATION_FWD_DIRECT, we will close spec->dest.fd.local in qemuMigrationRun(). So we should set spec->dest.fd.local to -1 in qemuMigrationRun(). Bug present since 0.9.5 (commit 326176179).
This commit is contained in:
parent
746ff701e8
commit
b19c236d69
@ -1910,8 +1910,10 @@ qemuMigrationRun(struct qemud_driver *driver,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MIGRATION_DEST_FD:
|
case MIGRATION_DEST_FD:
|
||||||
if (spec->fwdType != MIGRATION_FWD_DIRECT)
|
if (spec->fwdType != MIGRATION_FWD_DIRECT) {
|
||||||
fd = spec->dest.fd.local;
|
fd = spec->dest.fd.local;
|
||||||
|
spec->dest.fd.local = -1;
|
||||||
|
}
|
||||||
ret = qemuMonitorMigrateToFd(priv->mon, migrate_flags,
|
ret = qemuMonitorMigrateToFd(priv->mon, migrate_flags,
|
||||||
spec->dest.fd.qemu);
|
spec->dest.fd.qemu);
|
||||||
VIR_FORCE_CLOSE(spec->dest.fd.qemu);
|
VIR_FORCE_CLOSE(spec->dest.fd.qemu);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user