From owner-svn-src-all@FreeBSD.ORG Thu Aug 28 11:50:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9EEDE92B; Thu, 28 Aug 2014 11:50:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A7EE1949; Thu, 28 Aug 2014 11:50:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7SBoq1O000376; Thu, 28 Aug 2014 11:50:52 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7SBoqh9000375; Thu, 28 Aug 2014 11:50:52 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201408281150.s7SBoqh9000375@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 28 Aug 2014 11:50:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270749 - head/contrib/openbsm/bin/auditdistd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2014 11:50:52 -0000 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);