Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jul 2021 14:57:58 GMT
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: a3b8a5841c59 - stable/12 - pf: padalign global locks found in pf.c
Message-ID:  <202107141457.16EEvwRp099389@gitrepo.freebsd.org>

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

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

commit a3b8a5841c59f4cba9cd5c86d210cd525598daa4
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2021-07-05 09:26:29 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2021-07-14 14:55:32 +0000

    pf: padalign global locks found in pf.c
    
    Reviewed by:    kp
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    
    (cherry picked from commit f649cff58721f493f218a4d1fb88a12255945472)
---
 sys/net/pfvar.h     | 4 ++--
 sys/netpfil/pf/pf.c | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h
index 6c934ad47bf2..d327451d869a 100644
--- a/sys/net/pfvar.h
+++ b/sys/net/pfvar.h
@@ -118,7 +118,7 @@ struct pfi_dynaddr {
 #define	PF_STATE_LOCK_ASSERT(s)		do {} while (0)
 #endif /* INVARIANTS */
 
-extern struct mtx pf_unlnkdrules_mtx;
+extern struct mtx_padalign pf_unlnkdrules_mtx;
 #define	PF_UNLNKDRULES_LOCK()	mtx_lock(&pf_unlnkdrules_mtx)
 #define	PF_UNLNKDRULES_UNLOCK()	mtx_unlock(&pf_unlnkdrules_mtx)
 
@@ -133,7 +133,7 @@ extern struct rmlock pf_rules_lock;
 #define	PF_RULES_RASSERT()	rm_assert(&pf_rules_lock, RA_RLOCKED)
 #define	PF_RULES_WASSERT()	rm_assert(&pf_rules_lock, RA_WLOCKED)
 
-extern struct mtx pf_table_stats_lock;
+extern struct mtx_padalign pf_table_stats_lock;
 #define	PF_TABLE_STATS_LOCK()	mtx_lock(&pf_table_stats_lock)
 #define	PF_TABLE_STATS_UNLOCK()	mtx_unlock(&pf_table_stats_lock)
 #define	PF_TABLE_STATS_OWNED()	mtx_owned(&pf_table_stats_lock)
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index aa7a01d50823..5f201c1228eb 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -179,7 +179,7 @@ STAILQ_HEAD(pf_send_head, pf_send_entry);
 VNET_DEFINE_STATIC(struct pf_send_head, pf_sendqueue);
 #define	V_pf_sendqueue	VNET(pf_sendqueue)
 
-static struct mtx pf_sendqueue_mtx;
+static struct mtx_padalign pf_sendqueue_mtx;
 MTX_SYSINIT(pf_sendqueue_mtx, &pf_sendqueue_mtx, "pf send queue", MTX_DEF);
 #define	PF_SENDQ_LOCK()		mtx_lock(&pf_sendqueue_mtx)
 #define	PF_SENDQ_UNLOCK()	mtx_unlock(&pf_sendqueue_mtx)
@@ -201,18 +201,18 @@ VNET_DEFINE_STATIC(struct pf_overload_head, pf_overloadqueue);
 VNET_DEFINE_STATIC(struct task, pf_overloadtask);
 #define	V_pf_overloadtask	VNET(pf_overloadtask)
 
-static struct mtx pf_overloadqueue_mtx;
+static struct mtx_padalign pf_overloadqueue_mtx;
 MTX_SYSINIT(pf_overloadqueue_mtx, &pf_overloadqueue_mtx,
     "pf overload/flush queue", MTX_DEF);
 #define	PF_OVERLOADQ_LOCK()	mtx_lock(&pf_overloadqueue_mtx)
 #define	PF_OVERLOADQ_UNLOCK()	mtx_unlock(&pf_overloadqueue_mtx)
 
 VNET_DEFINE(struct pf_krulequeue, pf_unlinked_rules);
-struct mtx pf_unlnkdrules_mtx;
+struct mtx_padalign pf_unlnkdrules_mtx;
 MTX_SYSINIT(pf_unlnkdrules_mtx, &pf_unlnkdrules_mtx, "pf unlinked rules",
     MTX_DEF);
 
-struct mtx pf_table_stats_lock;
+struct mtx_padalign pf_table_stats_lock;
 MTX_SYSINIT(pf_table_stats_lock, &pf_table_stats_lock, "pf table stats",
     MTX_DEF);
 



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