Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Nov 2012 00:14:02 +0000 (UTC)
From:      Olivier Houchard <cognet@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r243109 - head/sys/arm/arm
Message-ID:  <201211160014.qAG0E2qC082592@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cognet
Date: Fri Nov 16 00:14:02 2012
New Revision: 243109
URL: http://svnweb.freebsd.org/changeset/base/243109

Log:
  Don't forget to unlock the pmap lock on failure.

Modified:
  head/sys/arm/arm/pmap-v6.c

Modified: head/sys/arm/arm/pmap-v6.c
==============================================================================
--- head/sys/arm/arm/pmap-v6.c	Thu Nov 15 23:49:07 2012	(r243108)
+++ head/sys/arm/arm/pmap-v6.c	Fri Nov 16 00:14:02 2012	(r243109)
@@ -2361,8 +2361,10 @@ pmap_change_attr(vm_offset_t sva, vm_siz
 	 * Only supported on kernel virtual addresses, including the direct
 	 * map but excluding the recursive map.
 	 */
-	if (base < DMAP_MIN_ADDRESS)
+	if (base < DMAP_MIN_ADDRESS) {
+		PMAP_UNLOCK(kernel_pmap);
 		return (EINVAL);
+	}
 #endif
 	for (tmpva = base; tmpva < base + size; ) {
 		next_bucket = L2_NEXT_BUCKET(tmpva);
@@ -2377,8 +2379,10 @@ pmap_change_attr(vm_offset_t sva, vm_siz
 
 		ptep = &l2b->l2b_kva[l2pte_index(tmpva)];
 
-		if (*ptep == 0)
+		if (*ptep == 0) {
+			PMAP_UNLOCK(kernel_pmap);
 			return(EINVAL);
+		}
 
 		pte = *ptep &~ L2_S_CACHE_MASK;
 		cpu_idcache_wbinv_range(tmpva, PAGE_SIZE);



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