[libvirt] [PATCH] qemu: Fix deadlock when qemuDomainOpenConsole cleans up a connection

Peter Krempa pkrempa at redhat.com
Wed Apr 11 09:07:18 UTC 2012


On 04/10/2012 05:43 PM, Eric Blake wrote:
> On 04/10/2012 07:29 AM, Peter Krempa wrote:
>> The new safe console handling introduced a possibility to deadlock the
>> qemu driver when a new console connection forcibly disconnects a
>> previous console stream that belongs to an already closed connection.
>>
>> The virStreamFree function calls subsequently a the virReleaseConnect
>> function that tries to lock the driver while discarding the connection,
>> but the driver was already locked in qemuDomainOpenConsole.
>>
>
>>
>> * src/qemu/qemu_driver.c: qemuDomainOpenConsole()
>>          -- unlock the qemu driver right after acquiring the domain
>>          object
>> ---
>>   src/qemu/qemu_driver.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> ACK; the rest of the function does not refer to driver, so moving the
> unlock sooner is safe.
>

Thanks, pushed.

Peter




More information about the libvir-list mailing list