From owner-svn-src-all@FreeBSD.ORG Tue Aug 18 19:58:50 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D894106568C; Tue, 18 Aug 2009 19:58:50 +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 3B7B98FC67; Tue, 18 Aug 2009 19:58:50 +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 n7IJwowM026752; Tue, 18 Aug 2009 19:58:50 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7IJwnXP026751; Tue, 18 Aug 2009 19:58:49 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <200908181958.n7IJwnXP026751@svn.freebsd.org> From: Michael Tuexen Date: Tue, 18 Aug 2009 19:58:49 +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: r196364 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 18 Aug 2009 19:58:50 -0000 Author: tuexen Date: Tue Aug 18 19:58:49 2009 New Revision: 196364 URL: http://svn.freebsd.org/changeset/base/196364 Log: Fix a crash when using one-to-one stlye socket in non-blocking mode and there is no listening server. PR: 137795 Approved by: re, rrs (mentor) MFC after:immediately. Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Tue Aug 18 16:23:09 2009 (r196363) +++ head/sys/netinet/sctp_output.c Tue Aug 18 19:58:49 2009 (r196364) @@ -12464,7 +12464,8 @@ sctp_lower_sosend(struct socket *so, error = ENOTCONN; goto out_unlocked; } - hold_tcblock = 0; + SCTP_TCB_LOCK(stcb); + hold_tcblock = 1; SCTP_INP_RUNLOCK(inp); if (addr) { /* Must locate the net structure if addr given */