- Use refcount_init().
- Define an INVARIANTS-only zone destructor to assert that various
bits of PCB state aren't dangling.
- Annotate unp_pcb_rele() with __result_use_check.
Details
Details
- Reviewers
glebius kevans kib - Commits
- rS365760: Improve unix socket PCB refcounting.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
We have some other callers doing unp_pcb_rele(...) == 0 that we should probably eventually clean up to match, but I don't suppose that needs to be done here.
Comment Actions
After the full patchset is applied those are all gone, i.e., we use consistent style.
Comment Actions
Yeah, my bad. Just started a good, hard look at D26297 and discovered it to take care of most (or all?) of them.
sys/kern/uipc_usrreq.c | ||
---|---|---|
319 ↗ | (On Diff #76541) | I wonder if this function should be moved to refcount.h, I think we already have more than two instances of such code. |