From owner-svn-src-head@FreeBSD.ORG Sun Sep 19 11:42:17 2010 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 42CBA106564A; Sun, 19 Sep 2010 11:42:17 +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 17B158FC13; Sun, 19 Sep 2010 11:42:17 +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 o8JBgG3p000546; Sun, 19 Sep 2010 11:42:16 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8JBgGbx000543; Sun, 19 Sep 2010 11:42:16 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201009191142.o8JBgGbx000543@svn.freebsd.org> From: Michael Tuexen Date: Sun, 19 Sep 2010 11:42:16 +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: r212850 - 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, 19 Sep 2010 11:42:17 -0000 Author: tuexen Date: Sun Sep 19 11:42:16 2010 New Revision: 212850 URL: http://svn.freebsd.org/changeset/base/212850 Log: Fix a locking issue which shows up when the code is used on Mac OS X. MFC after: 2 weeks. Modified: head/sys/netinet/sctp_auth.c head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_auth.c ============================================================================== --- head/sys/netinet/sctp_auth.c Sun Sep 19 11:22:22 2010 (r212849) +++ head/sys/netinet/sctp_auth.c Sun Sep 19 11:42:16 2010 (r212850) @@ -614,7 +614,7 @@ sctp_auth_key_release(struct sctp_tcb *s if ((skey->refcount <= 1) && (skey->deactivated)) { /* notify ULP that key is no longer used */ sctp_ulp_notify(SCTP_NOTIFY_AUTH_FREE_KEY, stcb, - key_id, 0, SCTP_SO_NOT_LOCKED); + key_id, 0, SCTP_SO_LOCKED); SCTPDBG(SCTP_DEBUG_AUTH2, "%s: stcb %p key %u no longer used, %d\n", __FUNCTION__, stcb, key_id, skey->refcount); Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Sep 19 11:22:22 2010 (r212849) +++ head/sys/netinet/sctp_pcb.c Sun Sep 19 11:42:16 2010 (r212850) @@ -4822,7 +4822,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, /* Still an open socket - report */ sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, stcb, SCTP_NOTIFY_DATAGRAM_UNSENT, - (void *)sp, 0); + (void *)sp, SCTP_SO_LOCKED); } if (sp->data) { sctp_m_freem(sp->data); @@ -4894,7 +4894,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, if (so) { /* Still a socket? */ sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_UNSENT, chk, 0); + SCTP_NOTIFY_DATAGRAM_UNSENT, chk, SCTP_SO_LOCKED); } if (chk->data) { sctp_m_freem(chk->data); @@ -4929,7 +4929,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, if (so) { /* Still a socket? */ sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_SENT, chk, 0); + SCTP_NOTIFY_DATAGRAM_SENT, chk, SCTP_SO_LOCKED); } if (chk->data) { sctp_m_freem(chk->data);