CVSROOT: /cvs Module name: src Changes by: bl...@cvs.openbsd.org 2025/06/20 07:54:59
Modified files: sys/kern : kern_synch.c Log message: Assert that reference count is always positive. Refcnt objects are always initialized to 1. When the counter drops to 0, the referenced object can be destroyed at any time. In refcnt_take() atomic_inc_int_nv() returns the incremented counter. That means if refs == 1, it has been 0 before. That would be a bug that should be caught. from Christian Ludwig; OK mvs@ kettenis@ a while ago