From owner-svn-src-head@FreeBSD.ORG Sun Oct 11 12:23:56 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2AB81065670; Sun, 11 Oct 2009 12:23:56 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1DCA8FC08; Sun, 11 Oct 2009 12:23:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9BCNua3011107; Sun, 11 Oct 2009 12:23:56 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9BCNuTp011104; Sun, 11 Oct 2009 12:23:56 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <200910111223.n9BCNuTp011104@svn.freebsd.org> From: Michael Tuexen Date: Sun, 11 Oct 2009 12:23:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197955 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2009 12:23:56 -0000 Author: tuexen Date: Sun Oct 11 12:23:56 2009 New Revision: 197955 URL: http://svn.freebsd.org/changeset/base/197955 Log: Fix a race condition where a mutex was destroyed while sleeping on it. Found while analyzing a report from julian. It might fix his bug. Approved by: rrs (mentor) MFC after: 3 days Modified: head/sys/netinet/sctp_bsd_addr.c head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_bsd_addr.c ============================================================================== --- head/sys/netinet/sctp_bsd_addr.c Sun Oct 11 11:00:14 2009 (r197954) +++ head/sys/netinet/sctp_bsd_addr.c Sun Oct 11 12:23:56 2009 (r197955) @@ -97,6 +97,7 @@ sctp_iterator_thread(void *v) &SCTP_BASE_INFO(ipi_iterator_wq_mtx), 0, "waiting_for_work", 0); if (SCTP_BASE_INFO(threads_must_exit)) { + SCTP_IPI_ITERATOR_WQ_DESTROY(); kthread_exit(); } sctp_iterator_worker(); Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Oct 11 11:00:14 2009 (r197954) +++ head/sys/netinet/sctp_pcb.c Sun Oct 11 12:23:56 2009 (r197955) @@ -5616,7 +5616,6 @@ sctp_pcb_finish(void) SCTP_IP_PKTLOG_DESTROY(); #endif - SCTP_IPI_ITERATOR_WQ_DESTROY(); SCTP_IPI_ADDR_DESTROY(); SCTP_ITERATOR_LOCK_DESTROY(); SCTP_STATLOG_DESTROY();