Index: kernel/generic/src/mm/as.c
===================================================================
--- kernel/generic/src/mm/as.c	(revision 8d308b91dd790ada0c5d8348bda8fc122a39f6b6)
+++ kernel/generic/src/mm/as.c	(revision 326bf65ebff26a7eb2af6a434fcb5ee4b2a7e0a0)
@@ -482,5 +482,5 @@
 	
 	/*
-	 * Search the leaf node and the righmost record of its left neighbour
+	 * Search the leaf node and the rightmost record of its left neighbour
 	 * to find out whether this is a miss or va belongs to an address
 	 * space area found there.
@@ -494,7 +494,7 @@
 		
 		mutex_lock(&area->lock);
-		
-		if ((area->base <= va) &&
-		    (va < area->base + (area->pages << PAGE_WIDTH)))
+
+		size_t size = area->pages << PAGE_WIDTH;
+		if ((area->base <= va) && (va <= area->base + (size - 1)))
 			return area;
 		
