Page MenuHomeFreeBSD

pf: Use MTX_DUPOK to initialize hash chain mutexes
ClosedPublic

Authored by markj on Sat, Apr 18, 12:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 29, 11:48 AM
Unknown Object (File)
Tue, Apr 28, 9:03 AM
Unknown Object (File)
Tue, Apr 28, 8:55 AM
Unknown Object (File)
Mon, Apr 27, 3:13 PM
Unknown Object (File)
Mon, Apr 27, 10:33 AM
Unknown Object (File)
Mon, Apr 27, 8:43 AM
Unknown Object (File)
Fri, Apr 24, 11:30 AM
Unknown Object (File)
Fri, Apr 24, 1:09 AM

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.Sat, Apr 18, 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.Sat, Apr 18, 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.