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

Reply via email to