Re: [PATCH 2/2] qemu: Avoid operations on NULL monitor if VM fails early

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

 



On 01/15/14 17:45, Michal Privoznik wrote:
> On 14.01.2014 19:31, Peter Krempa wrote:
>> https://bugzilla.redhat.com/show_bug.cgi?id=1047659
>>
>> If a VM dies very early during an attempted connect to the guest agent
>> while the locks are down the domain monitor object will be freed. The
>> object is then accessed later as any failure during guest agent startup
>> isn't considered fatal.
>>
>> In the current upstream version this doesn't lead to a crash as
>> virObjectLock called when entering the monitor in
>> qemuProcessDetectVcpuPIDs checks the pointer before attempting to
>> dereference (lock) it. The NULL pointer is then caught in the monitor
>> helper code.
>>
>> Before the introduction of virObjectLockable - observed on 0.10.2 - the
>> pointer is locked directly via virMutexLock leading to a crash.
>>
>> To avoid this problem we need to differentiate between the guest agent
>> not being present and the VM quitting when the locks were down. The fix
>> reorganizes the code in qemuConnectAgent to add the check and then adds
>> special handling to the callers.
>> ---
>>  src/qemu/qemu_process.c | 34 +++++++++++++++++++++++++---------
>>  1 file changed, 25 insertions(+), 9 deletions(-)
>>
> 
> ACK and safe for 1.2.1.
> 
> Michal
> 

Pushed; Thanks.

Peter


Attachment: signature.asc
Description: OpenPGP digital signature

--
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]