Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jun 2017 06:34:09 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r319686 - head/sys/netinet
Message-ID:  <201706080634.v586Y9Gw028351@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 |



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706080634.v586Y9Gw028351>