Index: kernel/arch/ia64/src/mm/tlb.c
===================================================================
--- kernel/arch/ia64/src/mm/tlb.c	(revision c263c77c4712f982349c184bbee4df2163f68baa)
+++ kernel/arch/ia64/src/mm/tlb.c	(revision 0ff03f3a9f7a35d56bf50ddb10304d4fe756524d)
@@ -481,5 +481,5 @@
 	
 	page_table_lock(AS, true);
-	t = page_mapping_find(AS, va);
+	t = page_mapping_find(AS, va, true);
 	if (t) {
 		/*
@@ -599,5 +599,5 @@
 	
 	page_table_lock(AS, true);
-	pte_t *entry = page_mapping_find(AS, va);
+	pte_t *entry = page_mapping_find(AS, va, true);
 	if (entry) {
 		/*
@@ -651,5 +651,5 @@
 	
 	page_table_lock(AS, true);
-	t = page_mapping_find(AS, va);
+	t = page_mapping_find(AS, va, true);
 	ASSERT((t) && (t->p));
 	if ((t) && (t->p) && (t->w)) {
@@ -684,5 +684,5 @@
 	
 	page_table_lock(AS, true);
-	t = page_mapping_find(AS, va);
+	t = page_mapping_find(AS, va, true);
 	ASSERT((t) && (t->p));
 	if ((t) && (t->p) && (t->x)) {
@@ -717,5 +717,5 @@
 	
 	page_table_lock(AS, true);
-	t = page_mapping_find(AS, va);
+	t = page_mapping_find(AS, va, true);
 	ASSERT((t) && (t->p));
 	if ((t) && (t->p)) {
@@ -753,5 +753,5 @@
 	 */
 	page_table_lock(AS, true);
-	t = page_mapping_find(AS, va);
+	t = page_mapping_find(AS, va, true);
 	ASSERT((t) && (t->p));
 	ASSERT(!t->w);
@@ -778,5 +778,5 @@
 	
 	page_table_lock(AS, true);
-	t = page_mapping_find(AS, va);
+	t = page_mapping_find(AS, va, true);
 	ASSERT(t);
 	
Index: kernel/arch/mips32/src/mm/tlb.c
===================================================================
--- kernel/arch/mips32/src/mm/tlb.c	(revision c263c77c4712f982349c184bbee4df2163f68baa)
+++ kernel/arch/mips32/src/mm/tlb.c	(revision 0ff03f3a9f7a35d56bf50ddb10304d4fe756524d)
@@ -379,5 +379,5 @@
 	 * Check if the mapping exists in page tables.
 	 */	
-	pte = page_mapping_find(AS, badvaddr);
+	pte = page_mapping_find(AS, badvaddr, true);
 	if (pte && pte->p && (pte->w || access != PF_ACCESS_WRITE)) {
 		/*
@@ -401,5 +401,5 @@
 			 */
 			page_table_lock(AS, true);
-			pte = page_mapping_find(AS, badvaddr);
+			pte = page_mapping_find(AS, badvaddr, true);
 			ASSERT(pte && pte->p);
 			ASSERT(pte->w || access != PF_ACCESS_WRITE);
Index: kernel/arch/ppc32/src/mm/tlb.c
===================================================================
--- kernel/arch/ppc32/src/mm/tlb.c	(revision c263c77c4712f982349c184bbee4df2163f68baa)
+++ kernel/arch/ppc32/src/mm/tlb.c	(revision 0ff03f3a9f7a35d56bf50ddb10304d4fe756524d)
@@ -67,5 +67,5 @@
 	 * Check if the mapping exists in page tables.
 	 */
-	pte_t *pte = page_mapping_find(as, badvaddr);
+	pte_t *pte = page_mapping_find(as, badvaddr, true);
 	if ((pte) && (pte->present)) {
 		/*
@@ -89,5 +89,5 @@
 			 */
 			page_table_lock(as, true);
-			pte = page_mapping_find(as, badvaddr);
+			pte = page_mapping_find(as, badvaddr, true);
 			ASSERT((pte) && (pte->present));
 			*pfrc = 0;
Index: kernel/arch/sparc64/src/mm/sun4u/tlb.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4u/tlb.c	(revision c263c77c4712f982349c184bbee4df2163f68baa)
+++ kernel/arch/sparc64/src/mm/sun4u/tlb.c	(revision 0ff03f3a9f7a35d56bf50ddb10304d4fe756524d)
@@ -207,5 +207,5 @@
 
 	page_table_lock(AS, true);
-	t = page_mapping_find(AS, page_16k);
+	t = page_mapping_find(AS, page_16k, true);
 	if (t && PTE_EXECUTABLE(t)) {
 		/*
@@ -275,5 +275,5 @@
 
 	page_table_lock(AS, true);
-	t = page_mapping_find(AS, page_16k);
+	t = page_mapping_find(AS, page_16k, true);
 	if (t) {
 		/*
@@ -319,5 +319,5 @@
 
 	page_table_lock(AS, true);
-	t = page_mapping_find(AS, page_16k);
+	t = page_mapping_find(AS, page_16k, true);
 	if (t && PTE_WRITABLE(t)) {
 		/*
Index: kernel/arch/sparc64/src/mm/sun4v/tlb.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4v/tlb.c	(revision c263c77c4712f982349c184bbee4df2163f68baa)
+++ kernel/arch/sparc64/src/mm/sun4v/tlb.c	(revision 0ff03f3a9f7a35d56bf50ddb10304d4fe756524d)
@@ -219,5 +219,5 @@
 
 	page_table_lock(AS, true);
-	t = page_mapping_find(AS, va);
+	t = page_mapping_find(AS, va, true);
 
 	if (t && PTE_EXECUTABLE(t)) {
@@ -275,5 +275,5 @@
 
 	page_table_lock(AS, true);
-	t = page_mapping_find(AS, va);
+	t = page_mapping_find(AS, va, true);
 	if (t) {
 		/*
@@ -317,5 +317,5 @@
 
 	page_table_lock(AS, true);
-	t = page_mapping_find(AS, va);
+	t = page_mapping_find(AS, va, true);
 	if (t && PTE_WRITABLE(t)) {
 		/*
Index: kernel/generic/include/mm/page.h
===================================================================
--- kernel/generic/include/mm/page.h	(revision c263c77c4712f982349c184bbee4df2163f68baa)
+++ kernel/generic/include/mm/page.h	(revision 0ff03f3a9f7a35d56bf50ddb10304d4fe756524d)
@@ -58,5 +58,5 @@
 extern void page_mapping_insert(as_t *, uintptr_t, uintptr_t, unsigned int);
 extern void page_mapping_remove(as_t *, uintptr_t);
-extern pte_t *page_mapping_find(as_t *, uintptr_t);
+extern pte_t *page_mapping_find(as_t *, uintptr_t, bool);
 extern pte_t *page_table_create(unsigned int);
 extern void page_table_destroy(pte_t *);
Index: kernel/generic/src/mm/as.c
===================================================================
--- kernel/generic/src/mm/as.c	(revision c263c77c4712f982349c184bbee4df2163f68baa)
+++ kernel/generic/src/mm/as.c	(revision 0ff03f3a9f7a35d56bf50ddb10304d4fe756524d)
@@ -649,5 +649,5 @@
 				for (; i < size; i++) {
 					pte_t *pte = page_mapping_find(as,
-					    ptr + P2SZ(i));
+					    ptr + P2SZ(i), false);
 					
 					ASSERT(pte);
@@ -798,5 +798,5 @@
 			for (size = 0; size < (size_t) node->value[i]; size++) {
 				pte_t *pte = page_mapping_find(as,
-				     ptr + P2SZ(size));
+				     ptr + P2SZ(size), false);
 				
 				ASSERT(pte);
@@ -1105,5 +1105,5 @@
 			for (size = 0; size < (size_t) node->value[i]; size++) {
 				pte_t *pte = page_mapping_find(as,
-				    ptr + P2SZ(size));
+				    ptr + P2SZ(size), false);
 				
 				ASSERT(pte);
@@ -1241,5 +1241,5 @@
 	 */
 	pte_t *pte;
-	if ((pte = page_mapping_find(AS, page))) {
+	if ((pte = page_mapping_find(AS, page, false))) {
 		if (PTE_PRESENT(pte)) {
 			if (((access == PF_ACCESS_READ) && PTE_READABLE(pte)) ||
Index: kernel/generic/src/mm/backend_anon.c
===================================================================
--- kernel/generic/src/mm/backend_anon.c	(revision c263c77c4712f982349c184bbee4df2163f68baa)
+++ kernel/generic/src/mm/backend_anon.c	(revision 0ff03f3a9f7a35d56bf50ddb10304d4fe756524d)
@@ -122,5 +122,5 @@
 				page_table_lock(area->as, false);
 				pte = page_mapping_find(area->as,
-				    base + j * PAGE_SIZE);
+				    base + j * PAGE_SIZE, false);
 				ASSERT(pte && PTE_VALID(pte) &&
 				    PTE_PRESENT(pte));
Index: kernel/generic/src/mm/backend_elf.c
===================================================================
--- kernel/generic/src/mm/backend_elf.c	(revision c263c77c4712f982349c184bbee4df2163f68baa)
+++ kernel/generic/src/mm/backend_elf.c	(revision 0ff03f3a9f7a35d56bf50ddb10304d4fe756524d)
@@ -188,5 +188,5 @@
 				page_table_lock(area->as, false);
 				pte = page_mapping_find(area->as,
-				    base + j * PAGE_SIZE);
+				    base + j * PAGE_SIZE, false);
 				ASSERT(pte && PTE_VALID(pte) &&
 				    PTE_PRESENT(pte));
Index: kernel/generic/src/mm/page.c
===================================================================
--- kernel/generic/src/mm/page.c	(revision c263c77c4712f982349c184bbee4df2163f68baa)
+++ kernel/generic/src/mm/page.c	(revision 0ff03f3a9f7a35d56bf50ddb10304d4fe756524d)
@@ -108,5 +108,5 @@
  * using flags. Allocate and setup any missing page tables.
  *
- * @param as    Address space to wich page belongs.
+ * @param as    Address space to which page belongs.
  * @param page  Virtual address of the page to be mapped.
  * @param frame Physical address of memory frame to which the mapping is
@@ -135,5 +135,5 @@
  * this call visible.
  *
- * @param as   Address space to wich page belongs.
+ * @param as   Address space to which page belongs.
  * @param page Virtual address of the page to be demapped.
  *
@@ -152,10 +152,9 @@
 }
 
-/** Find mapping for virtual page
+/** Find mapping for virtual page.
  *
- * Find mapping for virtual page.
- *
- * @param as   Address space to wich page belongs.
- * @param page Virtual page.
+ * @param as     Address space to which page belongs.
+ * @param page   Virtual page.
+ * @param nolock True if the page tables need not be locked.
  *
  * @return NULL if there is no such mapping; requested mapping
@@ -163,7 +162,7 @@
  *
  */
-NO_TRACE pte_t *page_mapping_find(as_t *as, uintptr_t page)
+NO_TRACE pte_t *page_mapping_find(as_t *as, uintptr_t page, bool nolock)
 {
-	ASSERT(page_table_locked(as));
+	ASSERT(nolock || page_table_locked(as));
 	
 	ASSERT(page_mapping_operations);
Index: kernel/generic/src/synch/futex.c
===================================================================
--- kernel/generic/src/synch/futex.c	(revision c263c77c4712f982349c184bbee4df2163f68baa)
+++ kernel/generic/src/synch/futex.c	(revision 0ff03f3a9f7a35d56bf50ddb10304d4fe756524d)
@@ -119,5 +119,5 @@
 	 */
 	page_table_lock(AS, true);
-	t = page_mapping_find(AS, ALIGN_DOWN(uaddr, PAGE_SIZE));
+	t = page_mapping_find(AS, ALIGN_DOWN(uaddr, PAGE_SIZE), false);
 	if (!t || !PTE_VALID(t) || !PTE_PRESENT(t)) {
 		page_table_unlock(AS, true);
@@ -155,5 +155,5 @@
 	 */
 	page_table_lock(AS, true);
-	t = page_mapping_find(AS, ALIGN_DOWN(uaddr, PAGE_SIZE));
+	t = page_mapping_find(AS, ALIGN_DOWN(uaddr, PAGE_SIZE), false);
 	if (!t || !PTE_VALID(t) || !PTE_PRESENT(t)) {
 		page_table_unlock(AS, true);
