From owner-svn-src-head@FreeBSD.ORG Thu Aug 27 16:15:51 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7E4C1065741; Thu, 27 Aug 2009 16:15:51 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D748B8FC3A; Thu, 27 Aug 2009 16:15:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7RGFpOb001163; Thu, 27 Aug 2009 16:15:51 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7RGFpeu001161; Thu, 27 Aug 2009 16:15:51 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <200908271615.n7RGFpeu001161@svn.freebsd.org> From: Jamie Gritton Date: Thu, 27 Aug 2009 16:15:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196592 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2009 16:15:52 -0000 Author: jamie Date: Thu Aug 27 16:15:51 2009 New Revision: 196592 URL: http://svn.freebsd.org/changeset/base/196592 Log: Fix a LOR between allprison_lock and vnode locks by releasing allprison_lock before releasing a prison's root vnode. PR: kern/138004 Reviewed by: kib Approved by: bz (mentor) MFC after: 3 days Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Thu Aug 27 16:15:32 2009 (r196591) +++ head/sys/kern/kern_jail.c Thu Aug 27 16:15:51 2009 (r196592) @@ -2453,7 +2453,7 @@ prison_deref(struct prison *pr, int flag ppr = pr->pr_parent; for (tpr = ppr; tpr != NULL; tpr = tpr->pr_parent) tpr->pr_childcount--; - sx_downgrade(&allprison_lock); + sx_xunlock(&allprison_lock); #ifdef VIMAGE if (pr->pr_vnet != ppr->pr_vnet) @@ -2479,7 +2479,7 @@ prison_deref(struct prison *pr, int flag /* Removing a prison frees a reference on its parent. */ pr = ppr; mtx_lock(&pr->pr_mtx); - flags = PD_DEREF | PD_LIST_SLOCKED; + flags = PD_DEREF; } }