summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2016-01-17 12:18:01 +0000
committertuexen <tuexen@FreeBSD.org>2016-01-17 12:18:01 +0000
commit2c9e1a88dc9d311bcede80648189f2024c1dc4f1 (patch)
treeb16de836b96f3e94110236d3e9b9e060e3c115ed /sys
parent70ab0ed557e2bfba1ee7f7e04ef56422a59c1d78 (diff)
downloadFreeBSD-src-2c9e1a88dc9d311bcede80648189f2024c1dc4f1.zip
FreeBSD-src-2c9e1a88dc9d311bcede80648189f2024c1dc4f1.tar.gz
MFC r292060:
Retire sctp_validate_no_locks(). This routine checks that there are no locks held for an inp, without having any lock on the inp. This breaks if the inp goes away when it is called. This happens on stress tests on a RPi B+.
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/sctp_input.c29
-rw-r--r--sys/netinet/sctp_output.c7
-rw-r--r--sys/netinet/sctp_pcb.h6
3 files changed, 0 insertions, 42 deletions
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c
index 993179b..675848a 100644
--- a/sys/netinet/sctp_input.c
+++ b/sys/netinet/sctp_input.c
@@ -5641,30 +5641,6 @@ next_chunk:
}
-#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)
*/
@@ -6050,11 +6026,6 @@ out:
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 f61de95..c727162 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -13554,13 +13554,6 @@ out_unlocked:
}
}
#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 ff6ccc5..165ef3b 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__ */
OpenPOWER on IntegriCloud