Author: ed
Date: Thu Aug 28 11:50:52 2014
New Revision: 270749
URL: http://svnweb.freebsd.org/changeset/base/270749

Log:
  Unlock the right lock.
  
  The adist_remote_lock is not held in this place, whereas the
  adist_recv_list_lock lock is and is picked up during the next iteration.
  
  I found this by annotating our libpthread with Clang's -Wthread-safety
  attributes. I will send out a patch for this in the nearby future,
  because it's awesome.
  
  MFC after:    2 weeks

Modified:
  head/contrib/openbsm/bin/auditdistd/sender.c

Modified: head/contrib/openbsm/bin/auditdistd/sender.c
==============================================================================
--- head/contrib/openbsm/bin/auditdistd/sender.c        Thu Aug 28 09:40:44 
2014        (r270748)
+++ head/contrib/openbsm/bin/auditdistd/sender.c        Thu Aug 28 11:50:52 
2014        (r270749)
@@ -643,7 +643,7 @@ recv_thread(void *arg __unused)
                         * we can use that.
                         */
                        if (TAILQ_EMPTY(&adist_recv_list)) {
-                               rw_unlock(&adist_remote_lock);
+                               mtx_unlock(&adist_recv_list_lock);
                                continue;
                        }
                        mtx_unlock(&adist_recv_list_lock);
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to