aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2026-04-20 16:48:40 +0000
committerMark Johnston <markj@FreeBSD.org>2026-04-20 16:50:05 +0000
commitffad36e1d7002a7da751856b28eb50c36b137abb (patch)
tree15d0e4927c227f9ff2b3727a21ac7e658ff57b53
parent019a4878831cee46a8df79bd4b7c1ea93db0a7a8 (diff)
pf: Use MTX_DUPOK to initialize hash chain mutexes
pf_udp_mapping_insert() may lock more than one row at a time. Fixes: cd5ff4e841fb ("pf: use hashalloc(9) for key, id, src-node and udp-endpoint hashes") Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D56501
-rw-r--r--sys/netpfil/pf/pf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 4576ad6e41de..dea40816e30f 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -1497,6 +1497,7 @@ retry_waitok2:
UMA_ALIGN_PTR, 0);
ha.size = V_pf_udpendpointhashsize;
ha.lname = "pf_udpendpointhash";
+ ha.lopts = MTX_DEF | MTX_DUPOK;
ha.mflags = M_NOWAIT;
retry_waitok3:
V_pf_udpendpointhash = hashalloc(&ha);