svn commit: r243109 - head/sys/arm/arm

Olivier Houchard cognet at FreeBSD.org
Fri Nov 16 00:14:02 UTC 2012


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);


More information about the svn-src-head mailing list