Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Dec 2012 18:34:37 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r244404 - head/sys/kern
Message-ID:  <201212181834.qBIIYbxh004311@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 }



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