From owner-svn-src-head@FreeBSD.ORG Tue Dec 18 18:34:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 492A328C; Tue, 18 Dec 2012 18:34:37 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2DEB58FC15; Tue, 18 Dec 2012 18:34:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBIIYbEw004312; Tue, 18 Dec 2012 18:34:37 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBIIYbxh004311; Tue, 18 Dec 2012 18:34:37 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201212181834.qBIIYbxh004311@svn.freebsd.org> From: Mateusz Guzik Date: Tue, 18 Dec 2012 18:34:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244404 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 18 Dec 2012 18:34:37 -0000 Author: mjg Date: Tue Dec 18 18:34:36 2012 New Revision: 244404 URL: http://svnweb.freebsd.org/changeset/base/244404 Log: prison_racct_detach can be called for not fully initialized jail, so make it check that the jail has racct before doing anything PR: kern/174436 Reviewed by: trasz MFC after: 3 days Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Tue Dec 18 18:04:29 2012 (r244403) +++ head/sys/kern/kern_jail.c Tue Dec 18 18:34:36 2012 (r244404) @@ -4518,6 +4518,8 @@ prison_racct_detach(struct prison *pr) sx_assert(&allprison_lock, SA_UNLOCKED); + if (pr->pr_prison_racct == NULL) + return; prison_racct_free(pr->pr_prison_racct); pr->pr_prison_racct = NULL; }