kern/138004: commit references a PR

dfilter service dfilter at FreeBSD.ORG
Thu Aug 27 16:20:05 UTC 2009


The following reply was made to PR kern/138004; it has been noted by GNATS.

From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at FreeBSD.org
Cc:  
Subject: Re: kern/138004: commit references a PR
Date: Thu, 27 Aug 2009 16:16:05 +0000 (UTC)

 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;
  	}
  }
  
 _______________________________________________
 svn-src-all at freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
 


More information about the freebsd-bugs mailing list