svn commit: r332202 - stable/11/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Sat Apr 7 19:16:07 UTC 2018


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


More information about the svn-src-all mailing list