Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jul 2025 10:07:05 GMT
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: efbaf14c5b68 - stable/14 - pfsync: Destroy buckets mutexes on clone destroying interface
Message-ID:  <202507071007.567A75TX053672@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by zlei:

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

commit efbaf14c5b681c8f1a04a47c7bf8740134fff098
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2025-06-28 15:46:51 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2025-07-07 10:05:10 +0000

    pfsync: Destroy buckets mutexes on clone destroying interface
    
    So that the associated data with them will be freed.
    
    Reviewed by:    kp
    Fixes:          4fc65bcbe3fb pfsync: Performance improvement
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D51063
    
    (cherry picked from commit 8213c07c20586a67bc7f7152bd7ff76c02cbc007)
---
 sys/netpfil/pf/if_pfsync.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c
index 5db72edc2dab..b75cc4e08029 100644
--- a/sys/netpfil/pf/if_pfsync.c
+++ b/sys/netpfil/pf/if_pfsync.c
@@ -492,6 +492,10 @@ pfsync_clone_destroy(struct ifnet *ifp)
 	mtx_destroy(&sc->sc_mtx);
 	mtx_destroy(&sc->sc_bulk_mtx);
 
+	for (c = 0; c < pfsync_buckets; c++) {
+		b = &sc->sc_buckets[c];
+		mtx_destroy(&b->b_mtx);
+	}
 	free(sc->sc_buckets, M_PFSYNC);
 	free(sc, M_PFSYNC);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202507071007.567A75TX053672>