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

Daniel P. Berrange berrange at redhat.com
Tue Nov 11 15:20:37 UTC 2014

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.

|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

More information about the libvir-list mailing list