Re: [PATCH v2 8/8] qemu: Fix some corner cases in persistent migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 17, 2015 at 18:40:59 -0400, John Ferlan wrote:
> 
> 
> On 09/11/2015 09:26 AM, Jiri Denemark wrote:
> > When persistently migrating a domain to a destination host where the
> > same domain already exists (i.e., it is persistent and shutdown at the
> > destination), we would happily through away the original persistent
> 
> s/through/throw
> 
> > definition without properly freeing it. And when updating the definition
> > fails for some reason we don't properly revert to the original state
> > leaving the domain broken.
> > 
> > In addition to fixing these issues, the patch also makes sure the domain
> > definition parsed from a migration cookie is either used or freed.
> > 
> > Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> > ---
> > 
> > Notes:
> >     Version 2:
> >     - new patch
> > 
> >  src/qemu/qemu_migration.c | 56 +++++++++++++++++++++++++++++++----------------
> >  1 file changed, 37 insertions(+), 19 deletions(-)
> > 
> 
> Ran using my Coverity checker...
> 
> One issue - in qemuMigrationPersist can get to 'cleanup:' calling
> qemuMigrationCookieGetPersistent when 'mig == NULL' from either the goto
> in the "if (!qemuMigrationJobIsActive(vm...)" or "if (!(mig =
> qemuMigrationEatCookie(driver, ..." paths
> 
> 
> > diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> > index c761657..1d556eb 100644
> > --- a/src/qemu/qemu_migration.c
> > +++ b/src/qemu/qemu_migration.c
...
> > @@ -5796,6 +5813,7 @@ qemuMigrationFinish(virQEMUDriverPtr driver,
> >          qemuMonitorSetDomainLog(priv->mon, -1);
> >      VIR_FREE(priv->origname);
> >      virDomainObjEndAPI(&vm);
> > +    virDomainDefFree(qemuMigrationCookieGetPersistent(mig));
> 
> If this has a "if (mig)", then Coverity is happy.

Hmm, coverity is right.

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]