Re: [PATCH] nwfilter: re-order lock grabbed by IP addr. learn thread

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

 



On 11/19/2010 02:49 PM, Eric Blake wrote:
On 11/18/2010 05:16 AM, Stefan Berger wrote:
The IP address learning thread was causing a deadlock when it
instantiated a filter while a filter update/change was ongoing. The
reason for this was the ordering of locks due to the following calls

virNWFilterUnlockFilterUpdates()
virNWFilterPoolObjFindByName()

+ * Call this function while holding the NWFilter filter update lock
  static int
  __virNWFilterInstantiateFilter(virConnectPtr conn,
I'm assuming that's a bogus line in your patch,
Yes, incomplete conversion from // to /* style comment. Fixed.
                                 bool teardownOld,
@@ -823,23 +822,30 @@ _virNWFilterInstantiateFilter(virConnect
                            ? net->data.direct.linkdev
                            : NULL;
      int ifindex;
+    int rc;

      if (ifaceGetIndex(true, net->ifname,&ifindex))
          return 1;
...
+    virNWFilterLockFilterUpdates();
+
+    rc = __virNWFilterInstantiateFilter(conn,
...especially given the fact that you grab the lock here, so
__virNWFilterInstantiateFilter should NOT have the filter update lock in
the caller.

ACK, once you fix that compilation error due to the stray line.

Pushed.

   Stefan

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