Page MenuHomeFreeBSD

socket: Add assertions around naked refcount decrements
ClosedPublic

Authored by markj on Sep 15 2021, 7:58 PM.
Tags
None
Referenced Files
F135471337: D31974.id95319.diff
Mon, Nov 10, 3:39 AM
F135374470: D31974.id95319.diff
Sun, Nov 9, 5:59 AM
Unknown Object (File)
Sat, Nov 8, 12:53 PM
Unknown Object (File)
Tue, Nov 4, 6:02 PM
Unknown Object (File)
Wed, Oct 29, 8:05 PM
Unknown Object (File)
Wed, Oct 29, 8:02 PM
Unknown Object (File)
Wed, Oct 29, 8:02 PM
Unknown Object (File)
Wed, Oct 29, 8:02 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