[libvirt] [PATCHv2] qemu: check for vm after starting a job

Eric Blake eblake at redhat.com
Thu Oct 28 15:04:18 UTC 2010


On 10/28/2010 08:39 AM, Daniel Veillard wrote:
> On Wed, Oct 27, 2010 at 02:28:51PM -0600, Eric Blake wrote:
>> https://bugzilla.redhat.com/show_bug.cgi?id=638285 - when migrating
>> a guest, it was very easy to provoke a race where an application
>> could query block information on a VM that had just been migrated
>> away.  Any time qemu code obtains a job lock, it must also check
>> that the VM was not taken down in the time where it was waiting
>> for the lock.
>>
>> * src/qemu/qemu_driver.c (qemudDomainSetMemory)
>> (qemudDomainGetInfo, qemuDomainGetBlockInfo): Check that vm still
>> exists after obtaining job lock, before starting monitor action.
>> ---
>>
>> v2: incorporate danpb's suggestions, to minimize virDomainObjIsActive
>> calls and avoid use of goto for mid-function labels.
>>
> 
>   ACK, it's true it makes for a nicer patch than v1

Thanks; pushed.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101028/de24213a/attachment-0001.sig>


More information about the libvir-list mailing list