[libvirt] [PATCH] nwfilter: fix deadlock caused updating network device and nwfilter

Pavel Hrdina phrdina at redhat.com
Wed Nov 12 09:51:14 UTC 2014


On 11/11/2014 04:20 PM, Daniel P. Berrange wrote:
> On Wed, Nov 05, 2014 at 03:02:03PM +0100, Pavel Hrdina wrote:
>> Commit 6e5c79a1 tried to fix deadlock between nwfilter{Define,Undefine}
>> and starting of guest, but this same deadlock is also for
>> updating/attaching network device to domain.
>>
>> The deadlock was introduced by removing global QEMU driver lock because
>> nwfilter was counting on this lock and ensure that all driver locks are
>> locked inside of nwfilter{Define,Undefine}.
>>
>> This patch extends usage of virNWFilterReadLockFilterUpdates to prevent
>> the deadlock for all possible paths in QEMU driver. LXC and UML drivers
>> still have global lock.
>
> ACK, conceptually it makes sense that we need to hold the read lock
> in these methods. Concurrency should still be good because it is
> only a read lock, not a write lock.
>
> Regards,
> Daniel
>

Thanks for the review, I've sent a v2 to address some code order issues
pointed out by John.

Pavel




More information about the libvir-list mailing list