From 3b3d05d769d0ede83ac8b9120ad47bf037606457 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Sun, 3 Nov 2013 14:00:17 +0000 Subject: [PATCH] Unlock the lock before destroying it. This issue was reported by Andrew Galante. MFC after: 3 days --- sys/netinet/sctp_pcb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index ffb6c10e15ba..57326d2c738b 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -4332,6 +4332,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockaddr *firstaddr, asoc->nr_mapping_array = NULL; } SCTP_DECR_ASOC_COUNT(); + SCTP_TCB_UNLOCK(stcb); SCTP_TCB_LOCK_DESTROY(stcb); SCTP_TCB_SEND_LOCK_DESTROY(stcb); LIST_REMOVE(stcb, sctp_tcbasocidhash); @@ -5134,6 +5135,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre /* Insert new items here :> */ /* Get rid of LOCK */ + SCTP_TCB_UNLOCK(stcb); SCTP_TCB_LOCK_DESTROY(stcb); SCTP_TCB_SEND_LOCK_DESTROY(stcb); if (from_inpcbfree == SCTP_NORMAL_PROC) {