Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Aug 2014 11:50:52 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r270749 - head/contrib/openbsm/bin/auditdistd
Message-ID:  <201408281150.s7SBoqh9000375@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408281150.s7SBoqh9000375>