Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Apr 2018 19:16:06 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r332202 - stable/11/sys/netinet
Message-ID:  <201804071916.w37JG6FF051647@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sat Apr  7 19:16:06 2018
New Revision: 332202
URL: https://svnweb.freebsd.org/changeset/base/332202

Log:
  MFC r323902:
  
  Add missing socket lock.

Modified:
  stable/11/sys/netinet/sctp_pcb.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/sctp_pcb.c
==============================================================================
--- stable/11/sys/netinet/sctp_pcb.c	Sat Apr  7 19:14:31 2018	(r332201)
+++ stable/11/sys/netinet/sctp_pcb.c	Sat Apr  7 19:16:06 2018	(r332202)
@@ -2484,7 +2484,9 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id)
 		inp->sctp_flags = (SCTP_PCB_FLAGS_TCPTYPE |
 		    SCTP_PCB_FLAGS_UNBOUND);
 		/* Be sure we have blocking IO by default */
+		SOCK_LOCK(so);
 		SCTP_CLEAR_SO_NBIO(so);
+		SOCK_UNLOCK(so);
 	} else {
 		/*
 		 * unsupported socket type (RAW, etc)- in case we missed it



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