Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Apr 2023 13:51:38 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: af94d8cc1716 - main - pf: fix incorrect lock define
Message-ID:  <202304181351.33IDpcS9056906@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp:

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

commit af94d8cc17164e2558fc97abdfbaeb550cd337b6
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2023-04-18 13:24:24 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2023-04-18 13:51:05 +0000

    pf: fix incorrect lock define
    
    PF_TABLE_STATS_ASSERT() should be checking pf_table_stats_lock not
    pf_rules_lock.
    
    Fortunately the define is not yet used anywhere so this was harmless.
    Fix it anyway, in case it does get used.
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/net/pfvar.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h
index e2cddb49728c..e9e23d985cfa 100644
--- a/sys/net/pfvar.h
+++ b/sys/net/pfvar.h
@@ -400,7 +400,7 @@ 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)
-#define	PF_TABLE_STATS_ASSERT()	mtx_assert(&pf_rules_lock, MA_OWNED)
+#define	PF_TABLE_STATS_ASSERT()	mtx_assert(&pf_table_stats_lock, MA_OWNED)
 
 extern struct sx pf_end_lock;
 



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