MFC jail: Don't allow jails under dying parents
If a jail is created with jail_set(...JAIL_DYING), and it has a parent
currently in a dying state, that will bring the parent jail back to
life. Restrict that to require that the parent itself be explicitly
brought back first, and not implicitly created along with the new
Differential Revision: https://reviews.freebsd.org/D28515
(cherry picked from commit 0a2a96f35a4c2dab3486438680fa289e12971e4b)
MFC jail: Fix locking on an early jail_set error.
I had locked allprison_lock without immediately setting PD_LIST_LOCKED.
(cherry picked from commit 108a9384e9e945cccba73c959f7e9cdb023cbcad)