svn commit: r323902 - head/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Fri Sep 22 06:07:48 UTC 2017


Author: tuexen
Date: Fri Sep 22 06:07:47 2017
New Revision: 323902
URL: https://svnweb.freebsd.org/changeset/base/323902

Log:
  Add missing socket lock.
  
  MFC after:	1 week

Modified:
  head/sys/netinet/sctp_pcb.c

Modified: head/sys/netinet/sctp_pcb.c
==============================================================================
--- head/sys/netinet/sctp_pcb.c	Fri Sep 22 05:14:11 2017	(r323901)
+++ head/sys/netinet/sctp_pcb.c	Fri Sep 22 06:07:47 2017	(r323902)
@@ -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