mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
qemu: Fix crash when resuming failed post-copy migration
Since commit28a0621528(released in 11.2.0) resuming a failed post-copy migration calls qemuProcessIncomingDefNew with fd == NULL rather than -1. The function does not expect to be called with NULL file descriptor and tries to dereference it causing virtqemud on the destination host to crash. Fixes:28a0621528Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
@@ -3642,6 +3642,7 @@ qemuMigrationDstPrepareResume(virQEMUDriver *driver,
|
||||
virDomainJobStatus status;
|
||||
virDomainObj *vm;
|
||||
int ret = -1;
|
||||
int nofd = -1;
|
||||
|
||||
VIR_DEBUG("name=%s, origname=%s, protocol=%s, port=%hu, "
|
||||
"listenAddress=%s, flags=0x%x",
|
||||
@@ -3684,7 +3685,7 @@ qemuMigrationDstPrepareResume(virQEMUDriver *driver,
|
||||
priv->origname = g_strdup(origname);
|
||||
|
||||
if (!(incoming = qemuMigrationDstPrepare(driver, vm, false, protocol,
|
||||
listenAddress, port, NULL)))
|
||||
listenAddress, port, &nofd)))
|
||||
goto cleanup;
|
||||
|
||||
if (qemuDomainObjEnterMonitorAsync(vm, VIR_ASYNC_JOB_MIGRATION_IN) < 0)
|
||||
|
||||
Reference in New Issue
Block a user