summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjamie <jamie@FreeBSD.org>2016-04-30 03:05:36 +0000
committerjamie <jamie@FreeBSD.org>2016-04-30 03:05:36 +0000
commit5a2943388bb3676f2c36fcbe57a4c43a8d2ff753 (patch)
tree5db69bb247c33223b180976c84560893bbad3130 /sys
parent3f7a5f21485e7540713ce7dce4f64e59f39b7bfb (diff)
downloadFreeBSD-src-5a2943388bb3676f2c36fcbe57a4c43a8d2ff753.zip
FreeBSD-src-5a2943388bb3676f2c36fcbe57a4c43a8d2ff753.tar.gz
MFC r298564:
Remove the PR_REMOVE flag, which was meant as a temporary marker for a jail that might be seen mid-removal. It hasn't been doing the right thing since at least the ability to resurrect dying jails, and such resurrection also makes it unnecessary.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_jail.c4
-rw-r--r--sys/sys/jail.h1
2 files changed, 1 insertions, 4 deletions
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
index 0d52c7b..d1f8796 100644
--- a/sys/kern/kern_jail.c
+++ b/sys/kern/kern_jail.c
@@ -1234,7 +1234,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags)
}
created = 1;
mtx_lock(&ppr->pr_mtx);
- if (ppr->pr_ref == 0 || (ppr->pr_flags & PR_REMOVE)) {
+ if (ppr->pr_ref == 0) {
mtx_unlock(&ppr->pr_mtx);
error = ENOENT;
vfs_opterror(opts, "parent jail went away!");
@@ -2290,7 +2290,6 @@ sys_jail_remove(struct thread *td, struct jail_remove_args *uap)
/* Remove all descendants of this prison, then remove this prison. */
pr->pr_ref++;
- pr->pr_flags |= PR_REMOVE;
if (!LIST_EMPTY(&pr->pr_children)) {
mtx_unlock(&pr->pr_mtx);
lpr = NULL;
@@ -2299,7 +2298,6 @@ sys_jail_remove(struct thread *td, struct jail_remove_args *uap)
if (cpr->pr_ref > 0) {
tpr = cpr;
cpr->pr_ref++;
- cpr->pr_flags |= PR_REMOVE;
} else {
/* Already removed - do not do it again. */
tpr = NULL;
diff --git a/sys/sys/jail.h b/sys/sys/jail.h
index 63f5ab9..a8a84b0b 100644
--- a/sys/sys/jail.h
+++ b/sys/sys/jail.h
@@ -212,7 +212,6 @@ struct prison_racct {
/* primary jail address. */
/* Internal flag bits */
-#define PR_REMOVE 0x01000000 /* In process of being removed */
#define PR_IP4 0x02000000 /* IPv4 restricted or disabled */
/* by this jail or an ancestor */
#define PR_IP6 0x04000000 /* IPv6 restricted or disabled */
OpenPOWER on IntegriCloud