Page MenuHomeFreeBSD

socket: Add assertions around naked refcount decrements
ClosedPublic

Authored by markj on Sep 15 2021, 7:58 PM.
Tags
None
Referenced Files
F169492106: D31974.id95319.diff
Tue, Sep 1, 4:59 PM
Unknown Object (File)
Tue, Sep 1, 1:44 PM
Unknown Object (File)
Mon, Aug 31, 9:48 PM
Unknown Object (File)
Mon, Aug 31, 8:08 AM
Unknown Object (File)
Sat, Aug 29, 9:12 PM
Unknown Object (File)
Sat, Aug 29, 7:01 PM
Unknown Object (File)
Sat, Aug 29, 3:54 PM
Unknown Object (File)
Mon, Aug 24, 4:25 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