Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Apr 2016 03:05:37 +0000 (UTC)
From:      Jamie Gritton <jamie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r298832 - in stable/10/sys: kern sys
Message-ID:  <201604300305.u3U35bov036207@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jamie
Date: Sat Apr 30 03:05:36 2016
New Revision: 298832
URL: https://svnweb.freebsd.org/changeset/base/298832

Log:
  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.

Modified:
  stable/10/sys/kern/kern_jail.c
  stable/10/sys/sys/jail.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/kern_jail.c
==============================================================================
--- stable/10/sys/kern/kern_jail.c	Sat Apr 30 02:47:41 2016	(r298831)
+++ stable/10/sys/kern/kern_jail.c	Sat Apr 30 03:05:36 2016	(r298832)
@@ -1234,7 +1234,7 @@ kern_jail_set(struct thread *td, struct 
 			}
 		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, struc
 
 	/* 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, struc
 			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;

Modified: stable/10/sys/sys/jail.h
==============================================================================
--- stable/10/sys/sys/jail.h	Sat Apr 30 02:47:41 2016	(r298831)
+++ stable/10/sys/sys/jail.h	Sat Apr 30 03:05:36 2016	(r298832)
@@ -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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604300305.u3U35bov036207>