]> xenbits.xensource.com Git - libvirt.git/commit
libxl: fix vm lock overwritten bug
authorWang Yufei <james.wangyufei@huawei.com>
Sun, 12 Jun 2016 10:30:00 +0000 (18:30 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 13 Jun 2016 11:34:37 +0000 (13:34 +0200)
commit9ac9450780b234e342a24c700ff87cf95bfa24f6
tree2f964fa5785d42bbe6fede26b04f32bb67d358ed
parentfc1b2428acc57613d8309278851718ac862e58af
libxl: fix vm lock overwritten bug

In libxl driver we do virObjectRef in libxlDomainObjBeginJob,
If virCondWaitUntil failed, it goes to error, do virObjectUnref,
There's a chance that someone undefine the vm at the same time,
and refs unref to zero, vm is freed in libxlDomainObjBeginJob.
But the vm outside function is not Null, we do virObjectUnlock(vm).
That's how we overwrite the vm memory after it's freed. I fix it.

Signed-off-by: Wang Yufei <james.wangyufei@huawei.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/virdomainobjlist.c
src/conf/virdomainobjlist.h
src/libvirt_private.syms
src/libxl/libxl_domain.c
src/libxl/libxl_domain.h
src/libxl/libxl_driver.c
src/libxl/libxl_migration.c