diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index ca15a0dc978a..9edfcf67808a 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -5641,30 +5641,6 @@ __attribute__((noinline)) } -#ifdef INVARIANTS -#ifdef __GNUC__ -__attribute__((noinline)) -#endif - void - sctp_validate_no_locks(struct sctp_inpcb *inp) -{ - struct sctp_tcb *lstcb; - - LIST_FOREACH(lstcb, &inp->sctp_asoc_list, sctp_tcblist) { - if (mtx_owned(&lstcb->tcb_mtx)) { - panic("Own lock on stcb at return from input"); - } - } - if (mtx_owned(&inp->inp_create_mtx)) { - panic("Own create lock on inp"); - } - if (mtx_owned(&inp->inp_mtx)) { - panic("Own inp lock on inp"); - } -} - -#endif - /* * common input chunk processing (v4 and v6) */ @@ -6048,11 +6024,6 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, int lengt SCTP_INP_DECR_REF(inp_decr); SCTP_INP_WUNLOCK(inp_decr); } -#ifdef INVARIANTS - if (inp != NULL) { - sctp_validate_no_locks(inp); - } -#endif return; } diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 1929b244ae30..c131edff5ee1 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -13537,13 +13537,6 @@ sctp_lower_sosend(struct socket *so, panic("Leaving with tcb send mtx owned?"); } } -#endif -#ifdef INVARIANTS - if (inp) { - sctp_validate_no_locks(inp); - } else { - SCTP_PRINTF("Warning - inp is NULL so cant validate locks\n"); - } #endif if (top) { sctp_m_freem(top); diff --git a/sys/netinet/sctp_pcb.h b/sys/netinet/sctp_pcb.h index ff6ccc56c59a..165ef3b45813 100644 --- a/sys/netinet/sctp_pcb.h +++ b/sys/netinet/sctp_pcb.h @@ -654,11 +654,5 @@ void #endif -#ifdef INVARIANTS -void - sctp_validate_no_locks(struct sctp_inpcb *inp); - -#endif - #endif /* _KERNEL */ #endif /* !__sctp_pcb_h__ */