git: efbaf14c5b68 - stable/14 - pfsync: Destroy buckets mutexes on clone destroying interface
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 07 Jul 2025 10:07:05 UTC
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);