Page MenuHomeFreeBSD

pf: Use MTX_DUPOK to initialize hash chain mutexes
ClosedPublic

Authored by markj on Apr 18 2026, 12:12 PM.
Tags
None
Referenced Files
F157144808: D56501.id175904.diff
Mon, May 18, 6:12 PM
F157103788: D56501.id175906.diff
Mon, May 18, 11:32 AM
F157103095: D56501.id175906.diff
Mon, May 18, 11:25 AM
F157062376: D56501.id175832.diff
Mon, May 18, 5:27 AM
F157061574: D56501.id175832.diff
Mon, May 18, 5:22 AM
F157021825: D56501.id175916.diff
Mon, May 18, 12:10 AM
F157021174: D56501.id175916.diff
Mon, May 18, 12:04 AM
F157009660: D56501.id175906.diff
Sun, May 17, 10:47 PM

Details

Summary

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")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

glebius requested changes to this revision.Apr 18 2026, 6:58 PM

I screwed up, but not on this hash. Looking at cd5ff4e841fb I see that I lost MTX_DUPOK on UDP endpoint hash.

This revision now requires changes to proceed.Apr 18 2026, 6:58 PM
sys/netpfil/pf/pf.c
1499–1500

Should be here!

I did see a warning about that recently but didn't investigate too much. This (with Gleb's remark) makes sense.

sys/netpfil/pf/pf.c
1500

That wants to be 'lopts', not 'lops'.

markj marked an inline comment as done.

Typo

This revision was not accepted when it landed; it landed in state Needs Review.Mon, Apr 20, 4:50 PM
This revision was automatically updated to reflect the committed changes.