From owner-svn-src-all@freebsd.org Mon Apr 25 03:58:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70528B1B088; Mon, 25 Apr 2016 03:58:09 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25FE811C6; Mon, 25 Apr 2016 03:58:09 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3P3w8XH084959; Mon, 25 Apr 2016 03:58:08 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3P3w8wN084957; Mon, 25 Apr 2016 03:58:08 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201604250358.u3P3w8wN084957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Mon, 25 Apr 2016 03:58:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298564 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2016 03:58:09 -0000 Author: jamie Date: Mon Apr 25 03:58:08 2016 New Revision: 298564 URL: https://svnweb.freebsd.org/changeset/base/298564 Log: 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: head/sys/kern/kern_jail.c head/sys/sys/jail.h Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Mon Apr 25 03:48:28 2016 (r298563) +++ head/sys/kern/kern_jail.c Mon Apr 25 03:58:08 2016 (r298564) @@ -1222,7 +1222,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!"); @@ -2273,7 +2273,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; @@ -2282,7 +2281,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: head/sys/sys/jail.h ============================================================================== --- head/sys/sys/jail.h Mon Apr 25 03:48:28 2016 (r298563) +++ head/sys/sys/jail.h Mon Apr 25 03:58:08 2016 (r298564) @@ -210,7 +210,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 */