⬢ DragonFlyBSD Kernel Audit
DF-2943 / sourcenote.txt
← back to finding ↓ download raw
Line-accurate confirmation (dead code; rg over sys/ in this session
re-verified zero callers):
sys/kern/kern_sysref.c:105-125 sysref_init - no callers (prototype
   only, sys/sys/sysref2.h:122); initializes neither SRF_ALLOCATED
   nor objcache backing, yet a final sysref_put would objcache_put
   non-objcache memory on production builds (only guards are the
   INVARIANTS KKASSERT at :347)
sys/kern/kern_sysref.c:362-373 allocsysid - no callers
SRC_MANAGEDINIT: set by no class; SRF_SYSIDUSED: never set ->
   :350-351 objcache_dtor branch unreachable
Fix retires both functions and their prototypes.