]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit - sys/kern/uipc_usrreq.c
Improve unix socket PCB refcounting.
authormarkj <markj@FreeBSD.org>
Tue, 15 Sep 2020 19:21:58 +0000 (19:21 +0000)
committermarkj <markj@FreeBSD.org>
Tue, 15 Sep 2020 19:21:58 +0000 (19:21 +0000)
commit2bc293973b3c1c7ac27b7da79f85540c5b0b4335
tree279b61d83989f16851774d6bbdfde02821481fda
parent55149e36f2c55b90f93b7ff58de37337bd6e83c5
Improve unix socket PCB refcounting.

- Use refcount_init().
- Define an INVARIANTS-only zone destructor to assert that various
  bits of PCB state aren't left dangling.
- Annotate unp_pcb_rele() with __result_use_check.
- Simplify control flow.

Reviewed by: glebius, kevans, kib
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26295
sys/kern/uipc_usrreq.c