git: 249626cfd805 - stable/13 - sctp: remove a test, which isn't safe

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Wed, 01 Feb 2023 22:30:07 UTC
The branch stable/13 has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=249626cfd805e42eacd7c892d50b2bf88fc1c4b6

commit 249626cfd805e42eacd7c892d50b2bf88fc1c4b6
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2022-04-02 13:09:50 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2023-02-01 22:29:43 +0000

    sctp: remove a test, which isn't safe
    
     We can't ensure the stcb is still around. This issue was found
     by syzkaller.
    
    (cherry picked from commit 0f316316200386986de7ac72cf717c13b28f387e)
---
 sys/netinet/sctp_output.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index 39a6140fd36c..d0cebba4335b 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -13655,11 +13655,6 @@ out_unlocked:
 		if (free_cnt_applied) {
 			atomic_subtract_int(&asoc->refcnt, 1);
 		}
-#ifdef INVARIANTS
-		if (mtx_owned(&stcb->tcb_mtx)) {
-			panic("Leaving with tcb mtx owned?");
-		}
-#endif
 	}
 	if (top != NULL) {
 		sctp_m_freem(top);