Fix a locking issue which shows up when the code is used
on Mac OS X. MFC after: 2 weeks.
This commit is contained in:
parent
3fe0686746
commit
f8faf20cf6
@ -614,7 +614,7 @@ sctp_auth_key_release(struct sctp_tcb *stcb, uint16_t key_id)
|
||||
if ((skey->refcount <= 1) && (skey->deactivated)) {
|
||||
/* notify ULP that key is no longer used */
|
||||
sctp_ulp_notify(SCTP_NOTIFY_AUTH_FREE_KEY, stcb,
|
||||
key_id, 0, SCTP_SO_NOT_LOCKED);
|
||||
key_id, 0, SCTP_SO_LOCKED);
|
||||
SCTPDBG(SCTP_DEBUG_AUTH2,
|
||||
"%s: stcb %p key %u no longer used, %d\n",
|
||||
__FUNCTION__, stcb, key_id, skey->refcount);
|
||||
|
@ -4822,7 +4822,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre
|
||||
/* Still an open socket - report */
|
||||
sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, stcb,
|
||||
SCTP_NOTIFY_DATAGRAM_UNSENT,
|
||||
(void *)sp, 0);
|
||||
(void *)sp, SCTP_SO_LOCKED);
|
||||
}
|
||||
if (sp->data) {
|
||||
sctp_m_freem(sp->data);
|
||||
@ -4894,7 +4894,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre
|
||||
if (so) {
|
||||
/* Still a socket? */
|
||||
sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb,
|
||||
SCTP_NOTIFY_DATAGRAM_UNSENT, chk, 0);
|
||||
SCTP_NOTIFY_DATAGRAM_UNSENT, chk, SCTP_SO_LOCKED);
|
||||
}
|
||||
if (chk->data) {
|
||||
sctp_m_freem(chk->data);
|
||||
@ -4929,7 +4929,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre
|
||||
if (so) {
|
||||
/* Still a socket? */
|
||||
sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb,
|
||||
SCTP_NOTIFY_DATAGRAM_SENT, chk, 0);
|
||||
SCTP_NOTIFY_DATAGRAM_SENT, chk, SCTP_SO_LOCKED);
|
||||
}
|
||||
if (chk->data) {
|
||||
sctp_m_freem(chk->data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user