Page MenuHomeFreeBSD

socket: Add assertions around naked refcount decrements
ClosedPublic

Authored by markj on Sep 15 2021, 7:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 4 2024, 6:03 AM
Unknown Object (File)
Oct 3 2024, 8:37 PM
Unknown Object (File)
Oct 1 2024, 10:10 PM
Unknown Object (File)
Sep 30 2024, 5:31 AM
Unknown Object (File)
Sep 30 2024, 1:30 AM
Unknown Object (File)
Sep 28 2024, 11:29 AM
Unknown Object (File)
Sep 26 2024, 3:43 PM
Unknown Object (File)
Sep 22 2024, 4:23 PM
Subscribers

Details

Summary

Sockets in a listen queue hold a reference to the parent listening
socket. Several code paths release this reference manually when moving
a child socket out of the queue.

Replace comments about the expected post-decrement refcount value with
assertions. Use refcount_load() instead of a plain load. No functional
change intended.

Diff Detail

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