HomeFreeBSD

jail: clean up locking around do_jail_attach

Description

jail: clean up locking around do_jail_attach

jail_attach_jd passed PD_DEREF to do_jail_attach, assuming it would take
care of freeing the held prison. This is not true, as do_jail_attach
immediately cleared that flag, leaving the jail stock in dying state
when it is later removed.

Reported by: markj
Reviewed by: markj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D57674

Details

Provenance
jamieAuthored on Jun 25 2026, 3:21 AM
Parents
rG4ffa7e126ed0: kern: osd: trash a slot's methods upon deregistration
Branches
Unknown
Tags
Unknown