patch-1.3.22 linux/mm/vmalloc.c

Next file: linux/net/Changes
Previous file: linux/mm/swap.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.21/linux/mm/vmalloc.c linux/mm/vmalloc.c
@@ -120,7 +120,7 @@
 		page = __get_free_page(GFP_KERNEL);
 		if (!page)
 			return -ENOMEM;
-		*pte = mk_pte(page, PAGE_KERNEL);
+		set_pte(pte, mk_pte(page, PAGE_KERNEL));
 		address += PAGE_SIZE;
 		pte++;
 	}
@@ -179,7 +179,7 @@
 	do {
 		if (!pte_none(*pte))
 			printk("remap_area_pte: page already exists\n");
-		*pte = mk_pte(offset, PAGE_KERNEL);
+		set_pte(pte, mk_pte(offset, PAGE_KERNEL));
 		address += PAGE_SIZE;
 		offset += PAGE_SIZE;
 		pte++;
@@ -277,7 +277,7 @@
 	struct vm_struct *area;
 
 	size = PAGE_ALIGN(size);
-	if (!size || size > high_memory)
+	if (!size || size > (MAP_NR(high_memory) << PAGE_SHIFT))
 		return NULL;
 	area = get_vm_area(size);
 	if (!area)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this