summaryrefslogtreecommitdiffstats
path: root/contrib/openbsm/bin
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2014-08-28 11:50:52 +0000
committered <ed@FreeBSD.org>2014-08-28 11:50:52 +0000
commitbb8b11b3306047f9599268df40963a9d7f4b09d0 (patch)
tree0a7f51cd9c37e6c8d8fa27b2e843403d6d625bec /contrib/openbsm/bin
parentec92f2e61c40e5b3a519a14ea47a142d9047a75a (diff)
downloadFreeBSD-src-bb8b11b3306047f9599268df40963a9d7f4b09d0.zip
FreeBSD-src-bb8b11b3306047f9599268df40963a9d7f4b09d0.tar.gz
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
Diffstat (limited to 'contrib/openbsm/bin')
-rw-r--r--contrib/openbsm/bin/auditdistd/sender.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/openbsm/bin/auditdistd/sender.c b/contrib/openbsm/bin/auditdistd/sender.c
index ab90e6c..ec3702e 100644
--- a/contrib/openbsm/bin/auditdistd/sender.c
+++ b/contrib/openbsm/bin/auditdistd/sender.c
@@ -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);
OpenPOWER on IntegriCloud