The branch stable/13 has been updated by markj:

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

commit adfb7f807c662a69afc0b775ccf070cfab04aac5
Author:     Mark Johnston <[email protected]>
AuthorDate: 2021-09-09 12:33:26 +0000
Commit:     Mark Johnston <[email protected]>
CommitDate: 2021-09-16 12:37:53 +0000

    sctp: Clear assoc socket references when freeing a PCB
    
    This restores behaviour present in the first import of SCTP.  Commit
    ceaad40ae729dea2c5d8ffcfdd45bb96fb8969d2 commented this out and commit
    62fb761ff28bb184a2543e539dd689fefd5d3246 removed it.  However, once
    sctp_inpcb_free() returns, the socket reference is gone no matter what,
    so we need to clear it.
    
    Reported by:    [email protected]
    Reported by:    [email protected]
    Reported by:    [email protected]
    Reviewed by:    tuexen
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 4250aa1188b5622a6cef871003abd4a50067bdae)
---
 sys/netinet/sctp_pcb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c
index 85ea5a3f8a53..7e0c0562e8a9 100644
--- a/sys/netinet/sctp_pcb.c
+++ b/sys/netinet/sctp_pcb.c
@@ -3359,6 +3359,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, 
int from)
                LIST_FOREACH_SAFE(asoc, &inp->sctp_asoc_list, sctp_tcblist, 
nasoc) {
                        SCTP_TCB_LOCK(asoc);
                        if (asoc->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
+                               asoc->sctp_socket = NULL;
                                /* Skip guys being freed */
                                cnt_in_sd++;
                                if (asoc->asoc.state & 
SCTP_STATE_IN_ACCEPT_QUEUE) {
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to