summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/netinet/sctp_usrreq.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-08-09 13:04:41 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-09-21 10:29:37 +0200
commite4a8065910cd6b2e7e0448cc6431ca2906322389 (patch)
tree73492991cfa40f994c20d761d476e6bc16304536 /freebsd/sys/netinet/sctp_usrreq.c
parentUpdate to FreeBSD head 2017-08-01 (diff)
downloadrtems-libbsd-e4a8065910cd6b2e7e0448cc6431ca2906322389.tar.bz2
Update to FreeBSD head 2017-10-01
Git mirror commit b2f0376b45428f13151d229c5ae9d4d8f74acbd1. Update #3472.
Diffstat (limited to 'freebsd/sys/netinet/sctp_usrreq.c')
-rw-r--r--freebsd/sys/netinet/sctp_usrreq.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/freebsd/sys/netinet/sctp_usrreq.c b/freebsd/sys/netinet/sctp_usrreq.c
index fa136d4e..6ab04456 100644
--- a/freebsd/sys/netinet/sctp_usrreq.c
+++ b/freebsd/sys/netinet/sctp_usrreq.c
@@ -1961,6 +1961,7 @@ flags_out:
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, error);
} else {
id->assoc_value = stcb->asoc.vrf_id;
+ SCTP_TCB_UNLOCK(stcb);
*optsize = sizeof(struct sctp_assoc_value);
}
break;
@@ -3065,7 +3066,6 @@ flags_out:
if (event_type > 0) {
if (stcb) {
event->se_on = sctp_stcb_is_feature_on(inp, stcb, event_type);
- SCTP_TCB_UNLOCK(stcb);
} else {
if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) ||
(inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) ||
@@ -3079,6 +3079,9 @@ flags_out:
}
}
}
+ if (stcb != NULL) {
+ SCTP_TCB_UNLOCK(stcb);
+ }
if (error == 0) {
*optsize = sizeof(struct sctp_event);
}
@@ -3649,12 +3652,16 @@ flags_out:
sprstat->sprstat_abandoned_unsent = stcb->asoc.strmout[sid].abandoned_unsent[0];
sprstat->sprstat_abandoned_sent = stcb->asoc.strmout[sid].abandoned_sent[0];
#endif
- SCTP_TCB_UNLOCK(stcb);
- *optsize = sizeof(struct sctp_prstatus);
} else {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
error = EINVAL;
}
+ if (stcb != NULL) {
+ SCTP_TCB_UNLOCK(stcb);
+ }
+ if (error == 0) {
+ *optsize = sizeof(struct sctp_prstatus);
+ }
break;
}
case SCTP_PR_ASSOC_STATUS:
@@ -3677,12 +3684,16 @@ flags_out:
sprstat->sprstat_abandoned_unsent = stcb->asoc.abandoned_unsent[policy];
sprstat->sprstat_abandoned_sent = stcb->asoc.abandoned_sent[policy];
}
- SCTP_TCB_UNLOCK(stcb);
- *optsize = sizeof(struct sctp_prstatus);
} else {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
error = EINVAL;
}
+ if (stcb != NULL) {
+ SCTP_TCB_UNLOCK(stcb);
+ }
+ if (error == 0) {
+ *optsize = sizeof(struct sctp_prstatus);
+ }
break;
}
case SCTP_MAX_CWND: