Page MenuHomeFreeBSD

socket: Add assertions around naked refcount decrements
ClosedPublic

Authored by markj on Sep 15 2021, 7:58 PM.
Tags
None
Referenced Files
F149535407: D31974.diff
Wed, Mar 25, 2:26 AM
Unknown Object (File)
Mon, Mar 23, 12:38 PM
Unknown Object (File)
Sun, Mar 22, 6:58 PM
Unknown Object (File)
Mon, Mar 16, 2:31 PM
Unknown Object (File)
Mon, Mar 16, 8:40 AM
Unknown Object (File)
Mon, Mar 16, 2:47 AM
Unknown Object (File)
Sun, Mar 15, 8:27 PM
Unknown Object (File)
Mon, Mar 9, 7:04 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