From owner-svn-src-head@freebsd.org Thu Jun 8 06:34:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 087A9BF7C1A; Thu, 8 Jun 2017 06:34:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 CBA437686F; Thu, 8 Jun 2017 06:34:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v586Y9Pv028352; Thu, 8 Jun 2017 06:34:09 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v586Y9Gw028351; Thu, 8 Jun 2017 06:34:09 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201706080634.v586Y9Gw028351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 8 Jun 2017 06:34:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319686 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Thu, 08 Jun 2017 06:34:11 -0000 Author: glebius Date: Thu Jun 8 06:34:09 2017 New Revision: 319686 URL: https://svnweb.freebsd.org/changeset/base/319686 Log: The desired lock here is socket buffer, not socket. Right now they match, but won't in future. Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Thu Jun 8 06:16:47 2017 (r319685) +++ head/sys/netinet/sctp_pcb.c Thu Jun 8 06:34:09 2017 (r319686) @@ -4856,7 +4856,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc inp->sctp_flags &= ~SCTP_PCB_FLAGS_CONNECTED; inp->sctp_flags |= SCTP_PCB_FLAGS_WAS_CONNECTED; if (so) { - SOCK_LOCK(so); + SOCKBUF_LOCK(&so->so_rcv); if (so->so_rcv.sb_cc == 0) { so->so_state &= ~(SS_ISCONNECTING | SS_ISDISCONNECTING |