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
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to