svn commit: r257001 - projects/vps/sys/kern

Will Andrews will at FreeBSD.org
Wed Oct 23 18:33:09 UTC 2013


Author: will
Date: Wed Oct 23 18:33:09 2013
New Revision: 257001
URL: http://svnweb.freebsd.org/changeset/base/257001

Log:
  Sync with svn.7he.at/vps/trunk r196.
  
  r196 | klaus | 2013-07-29 07:29:32 -0600 (Mon, 29 Jul 2013) | 3 lines
  Fixed a bug where an already deleted vps was referenced in deadlkres().
  
  Submitted by:	Klaus P. Ohrhallinger <k at 7he.at>

Modified:
  projects/vps/sys/kern/kern_clock.c

Modified: projects/vps/sys/kern/kern_clock.c
==============================================================================
--- projects/vps/sys/kern/kern_clock.c	Wed Oct 23 18:32:25 2013	(r257000)
+++ projects/vps/sys/kern/kern_clock.c	Wed Oct 23 18:33:09 2013	(r257001)
@@ -214,6 +214,7 @@ deadlkres(void)
 		save_vps = curthread->td_vps;
 		sx_slock(&vps_all_lock);
 		LIST_FOREACH_SAFE(vps, &vps_head, vps_all, vps_tmp) {
+		vps_ref(vps, (struct ucred *)&deadlkres);
 		sx_sunlock(&vps_all_lock);
 		curthread->td_vps = vps;
 #endif /* VPS */
@@ -233,6 +234,7 @@ deadlkres(void)
 			tryl++;
 			pause("allproc", sleepfreq * hz);
 #ifdef VPS
+			vps_deref(vps, (struct ucred *)&deadlkres);
 			sx_slock(&vps_all_lock);
 #endif /* VPS */
 			continue;
@@ -330,6 +332,7 @@ deadlkres(void)
 		}
 		sx_sunlock(&V_allproc_lock);
 #ifdef VPS
+		vps_deref(vps, (struct ucred *)&deadlkres);
 		sx_slock(&vps_all_lock);
 		}
 		sx_sunlock(&vps_all_lock);


More information about the svn-src-projects mailing list