jail: Don't allow jails under dying parents
authorJamie Gritton <jamie@FreeBSD.org>
Tue, 23 Feb 2021 01:04:06 +0000 (17:04 -0800)
committerJamie Gritton <jamie@FreeBSD.org>
Tue, 23 Feb 2021 01:04:06 +0000 (17:04 -0800)
commit0a2a96f35a4c2dab3486438680fa289e12971e4b
tree931ff4bee0bc44798cd6a2b614fe984dee12a245
parent7f06b217c53c3f5e4ac81eb11125adfb71359ac6
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
child jail.

Differential Revision: https://reviews.freebsd.org/D28515
sys/kern/kern_jail.c