Page MenuHomeFreeBSD

socket: Add assertions around naked refcount decrements
ClosedPublic

Authored by markj on Sep 15 2021, 7:58 PM.
Tags
None
Referenced Files
F85228849: D31974.id95319.diff
Mon, Jun 3, 10:03 AM
Unknown Object (File)
Wed, May 22, 9:36 AM
Unknown Object (File)
Tue, May 21, 10:06 AM
Unknown Object (File)
May 3 2024, 3:04 AM
Unknown Object (File)
May 3 2024, 3:04 AM
Unknown Object (File)
May 3 2024, 3:04 AM
Unknown Object (File)
Apr 27 2024, 4:30 PM
Unknown Object (File)
Apr 9 2024, 6: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