On 03/17/2011 04:54 AM, Daniel P. Berrange wrote:
> On Wed, Mar 16, 2011 at 02:54:28PM +0800, Wen Congyang wrote:
>> Steps to reproduce this bug:
>> # virsh qemu-monitor-command domain 'cpu_set 2 online' --hmp
>> The domain has 2 cpus, and we try to set the third cpu online.
>> The qemu crashes, and this command will hang.
>>
>> The reason is that the refs is not 1 when we unwatch the monitor.
>> We lock the monitor, but we do not unlock it. So virCondWait()
>> will be blocked.
>>

>>      qemuMonitorLock(mon);
>> -    qemuMonitorUnref(mon);
>> +    if (qemuMonitorUnref(mon) > 0)
>> +        qemuMonitorUnlock(mon);
>>  }
> 
> ACK

Pushed.

> 
> We should probably annotate qemuMonitorUnref() (and similar functions)
> with ATTRIBUTE_RETURN_CHECK too

I'm working on that now...

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

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to