git: 9d53e7eaab9e - stable/13 - pfsync: Destroy buckets mutexes on clone destroying interface
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 08 Jul 2025 10:05:08 UTC
The branch stable/13 has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=9d53e7eaab9e2e75491941dc035a345bc0f39c99
commit 9d53e7eaab9e2e75491941dc035a345bc0f39c99
Author: Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2025-06-28 15:46:51 +0000
Commit: Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2025-07-08 10:03:29 +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)
(cherry picked from commit efbaf14c5b681c8f1a04a47c7bf8740134fff098)
---
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 412739513472..9eef37ff9005 100644
--- a/sys/netpfil/pf/if_pfsync.c
+++ b/sys/netpfil/pf/if_pfsync.c
@@ -437,6 +437,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);