patch-1.3.69 linux/mm/memory.c

Next file: linux/mm/mlock.c
Previous file: linux/mm/kmalloc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.68/linux/mm/memory.c linux/mm/memory.c
@@ -431,6 +431,7 @@
 {
 	int error = 0;
 	pgd_t * dir;
+	unsigned long beg = address;
 	unsigned long end = address + size;
 	pte_t zero_pte;
 
@@ -447,7 +448,7 @@
 		address = (address + PGDIR_SIZE) & PGDIR_MASK;
 		dir++;
 	}
-	invalidate_range(current->mm, end - size, end);
+	invalidate_range(current->mm, beg, end);
 	return error;
 }
 
@@ -502,6 +503,7 @@
 {
 	int error = 0;
 	pgd_t * dir;
+	unsigned long beg = from;
 	unsigned long end = from + size;
 
 	offset -= from;
@@ -517,7 +519,7 @@
 		from = (from + PGDIR_SIZE) & PGDIR_MASK;
 		dir++;
 	}
-	invalidate_range(current->mm, from - size, from);
+	invalidate_range(current->mm, beg, from);
 	return error;
 }
 

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