svn commit: r270038 - in head/sys: i386/i386 i386/xen sparc64/sparc64

Konstantin Belousov kib at FreeBSD.org
Sat Aug 16 08:31:26 UTC 2014


Author: kib
Date: Sat Aug 16 08:31:25 2014
New Revision: 270038
URL: http://svnweb.freebsd.org/changeset/base/270038

Log:
  Complete r254667, do not destroy pmap lock if KVA allocation failed.
  
  Submitted by:	Svatopluk Kraus <onwahe at gmail.com>
  MFC after:	1 week

Modified:
  head/sys/i386/i386/pmap.c
  head/sys/i386/xen/pmap.c
  head/sys/sparc64/sparc64/pmap.c

Modified: head/sys/i386/i386/pmap.c
==============================================================================
--- head/sys/i386/i386/pmap.c	Sat Aug 16 07:01:42 2014	(r270037)
+++ head/sys/i386/i386/pmap.c	Sat Aug 16 08:31:25 2014	(r270038)
@@ -1755,10 +1755,8 @@ pmap_pinit(pmap_t pmap)
 	 */
 	if (pmap->pm_pdir == NULL) {
 		pmap->pm_pdir = (pd_entry_t *)kva_alloc(NBPTD);
-		if (pmap->pm_pdir == NULL) {
-			PMAP_LOCK_DESTROY(pmap);
+		if (pmap->pm_pdir == NULL)
 			return (0);
-		}
 #ifdef PAE
 		pmap->pm_pdpt = uma_zalloc(pdptzone, M_WAITOK | M_ZERO);
 		KASSERT(((vm_offset_t)pmap->pm_pdpt &

Modified: head/sys/i386/xen/pmap.c
==============================================================================
--- head/sys/i386/xen/pmap.c	Sat Aug 16 07:01:42 2014	(r270037)
+++ head/sys/i386/xen/pmap.c	Sat Aug 16 08:31:25 2014	(r270038)
@@ -1459,7 +1459,6 @@ pmap_pinit(pmap_t pmap)
 	if (pmap->pm_pdir == NULL) {
 		pmap->pm_pdir = (pd_entry_t *)kva_alloc(NBPTD);
 		if (pmap->pm_pdir == NULL) {
-			PMAP_LOCK_DESTROY(pmap);
 #ifdef HAMFISTED_LOCKING
 			mtx_unlock(&createdelete_lock);
 #endif

Modified: head/sys/sparc64/sparc64/pmap.c
==============================================================================
--- head/sys/sparc64/sparc64/pmap.c	Sat Aug 16 07:01:42 2014	(r270037)
+++ head/sys/sparc64/sparc64/pmap.c	Sat Aug 16 08:31:25 2014	(r270038)
@@ -1211,11 +1211,9 @@ pmap_pinit(pmap_t pm)
 	 */
 	if (pm->pm_tsb == NULL) {
 		pm->pm_tsb = (struct tte *)kva_alloc(TSB_BSIZE);
-		if (pm->pm_tsb == NULL) {
-			PMAP_LOCK_DESTROY(pm);
+		if (pm->pm_tsb == NULL)
 			return (0);
 		}
-	}
 
 	/*
 	 * Allocate an object for it.


More information about the svn-src-all mailing list