svn commit: r270749 - head/contrib/openbsm/bin/auditdistd
Ed Schouten
ed at FreeBSD.org
Thu Aug 28 11:50:52 UTC 2014
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);
More information about the svn-src-head
mailing list