Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Aug 2014 08:31:25 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r270038 - in head/sys: i386/i386 i386/xen sparc64/sparc64
Message-ID:  <201408160831.s7G8VPHs010992@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408160831.s7G8VPHs010992>