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)
Thu, Dec 25, 9:28 AM
Unknown Object (File)
Mon, Dec 22, 9:11 PM
Unknown Object (File)
Sun, Dec 21, 3:49 PM
Unknown Object (File)
Sat, Dec 20, 9:32 PM
Unknown Object (File)
Fri, Dec 12, 11:17 PM
Unknown Object (File)
Thu, Dec 11, 8:34 AM
Unknown Object (File)
Nov 23 2025, 9:28 AM
Unknown Object (File)
Nov 23 2025, 9:20 AM
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