Fix a locking bug which only shows up on Mac OS X.

MFC after: 1 week
This commit is contained in:
Michael Tuexen 2016-05-14 13:44:49 +00:00
parent 3e104ce8ba
commit 574679afe9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=299744

View File

@ -559,7 +559,7 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb,
sctp_add_to_readq(stcb->sctp_ep, stcb,
control,
&stcb->sctp_socket->so_rcv, 1,
SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED);
SCTP_READ_LOCK_NOT_HELD, SCTP_SO_LOCKED);
TAILQ_FOREACH_SAFE(control, &strm->inqueue, next_instrm, at) {
/* all delivered */
nxt_todel = strm->last_sequence_delivered + 1;
@ -592,7 +592,7 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb,
control,
&stcb->sctp_socket->so_rcv, 1,
SCTP_READ_LOCK_NOT_HELD,
SCTP_SO_NOT_LOCKED);
SCTP_SO_LOCKED);
continue;
} else if (nxt_todel == control->sinfo_ssn) {
*need_reasm = 1;