HomeFreeBSD

jail: Add safety around prison_deref() flags.

Description

jail: Add safety around prison_deref() flags.

do_jail_attach() now only uses the PD_XXX flags that refer to lock
status, so make sure that something else like PD_KILL doesn't slip
through.

Add a KASSERT() in prison_deref() to catch any further PD_KILL misuse.

Details

Provenance
jamieAuthored on Feb 26 2021, 4:10 AM
Parents
rG108a9384e9e9: jail: Fix locking on an early jail_set error.
Branches
Unknown
Tags
Unknown