diff options
Diffstat (limited to 'sys/netinet/sctp_output.c')
-rw-r--r-- | sys/netinet/sctp_output.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 424f9803237c..11433ddcdba4 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -12561,6 +12561,7 @@ sctp_lower_sosend(struct socket *so, struct thread *p ) { + struct epoch_tracker et; ssize_t sndlen = 0, max_len, local_add_more; int error, len; struct mbuf *top = NULL; @@ -13062,7 +13063,9 @@ sctp_lower_sosend(struct socket *so, atomic_add_int(&stcb->asoc.refcnt, -1); free_cnt_applied = 0; /* release this lock, otherwise we hang on ourselves */ + NET_EPOCH_ENTER(et); sctp_abort_an_association(stcb->sctp_ep, stcb, mm, SCTP_SO_LOCKED); + NET_EPOCH_EXIT(et); /* now relock the stcb so everything is sane */ hold_tcblock = 0; stcb = NULL; @@ -13366,7 +13369,9 @@ skip_preblock: /* a collision took us forward? */ queue_only = 0; } else { + NET_EPOCH_ENTER(et); sctp_send_initiate(inp, stcb, SCTP_SO_LOCKED); + NET_EPOCH_EXIT(et); SCTP_SET_STATE(stcb, SCTP_STATE_COOKIE_WAIT); queue_only = 1; } @@ -13424,6 +13429,7 @@ skip_preblock: * the input via the net is happening * and I don't need to start output :-D */ + NET_EPOCH_ENTER(et); if (hold_tcblock == 0) { if (SCTP_TCB_TRYLOCK(stcb)) { hold_tcblock = 1; @@ -13436,6 +13442,7 @@ skip_preblock: stcb, SCTP_OUTPUT_FROM_USR_SEND, SCTP_SO_LOCKED); } + NET_EPOCH_EXIT(et); } if (hold_tcblock == 1) { SCTP_TCB_UNLOCK(stcb); @@ -13609,8 +13616,10 @@ dataless_eof: "%s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); + NET_EPOCH_ENTER(et); sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_LOCKED); + NET_EPOCH_EXIT(et); /* * now relock the stcb so everything * is sane @@ -13684,6 +13693,7 @@ skip_out_eof: stcb->asoc.total_flight, stcb->asoc.chunks_on_out_queue, stcb->asoc.total_flight_count); } + NET_EPOCH_ENTER(et); if ((queue_only == 0) && (nagle_applies == 0) && (stcb->asoc.peers_rwnd && un_sent)) { /* we can attempt to send too. */ if (hold_tcblock == 0) { @@ -13719,6 +13729,7 @@ skip_out_eof: (void)sctp_med_chunk_output(inp, stcb, &stcb->asoc, &num_out, &reason, 1, 1, &now, &now_filled, frag_point, SCTP_SO_LOCKED); } + NET_EPOCH_EXIT(et); SCTPDBG(SCTP_DEBUG_OUTPUT1, "USR Send complete qo:%d prw:%d unsent:%d tf:%d cooq:%d toqs:%d err:%d\n", queue_only, stcb->asoc.peers_rwnd, un_sent, stcb->asoc.total_flight, stcb->asoc.chunks_on_out_queue, |