svn commit: r244566 - stable/9/sys/kern

Mateusz Guzik mjg at FreeBSD.org
Fri Dec 21 21:40:52 UTC 2012


Author: mjg
Date: Fri Dec 21 21:40:51 2012
New Revision: 244566
URL: http://svnweb.freebsd.org/changeset/base/244566

Log:
  MFC r244404:
  
  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

Modified:
  stable/9/sys/kern/kern_jail.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/kern/kern_jail.c
==============================================================================
--- stable/9/sys/kern/kern_jail.c	Fri Dec 21 21:33:47 2012	(r244565)
+++ stable/9/sys/kern/kern_jail.c	Fri Dec 21 21:40:51 2012	(r244566)
@@ -4533,6 +4533,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;
 }


More information about the svn-src-stable-9 mailing list