svn commit: r196505 - head/sys/kern

Marko Zec zec at FreeBSD.org
Mon Aug 24 10:16:19 UTC 2009


Author: zec
Date: Mon Aug 24 10:16:19 2009
New Revision: 196505
URL: http://svn.freebsd.org/changeset/base/196505

Log:
  When "jail -c vnet" request fails, the current code actually creates and
  leaves behind an orphaned vnet.  This change ensures that such vnets get
  released.
  
  This change affects only options VIMAGE builds.
  
  Submitted by:	jamie
  Discussed with:	bz
  Approved by:	re (rwatson), julian (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	Mon Aug 24 10:14:09 2009	(r196504)
+++ head/sys/kern/kern_jail.c	Mon Aug 24 10:16:19 2009	(r196505)
@@ -2456,7 +2456,7 @@ prison_deref(struct prison *pr, int flag
 		sx_downgrade(&allprison_lock);
 
 #ifdef VIMAGE
-		if (pr->pr_flags & PR_VNET)
+		if (pr->pr_vnet != ppr->pr_vnet)
 			vnet_destroy(pr->pr_vnet);
 #endif
 		if (pr->pr_root != NULL) {


More information about the svn-src-head mailing list