]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC 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>
Fri, 12 Mar 2021 18:49:13 +0000 (10:49 -0800)
commitd2bbfc3754871f08e487ac59e5c03a088c8acad2
treeeb2434bf11859c4646b2eb6790601d4ed7131b47
parent2463395303482ad8d32d90ec990e5312d72105c6
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
child jail.

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)
sys/kern/kern_jail.c