patch-2.1.108 linux/mm/mlock.c

Next file: linux/mm/mmap.c
Previous file: linux/mm/memory.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.107/linux/mm/mlock.c linux/mm/mlock.c
@@ -126,26 +126,7 @@
 		if (!(newflags & VM_LOCKED))
 			pages = -pages;
 		vma->vm_mm->locked_vm += pages;
-
-#if 0
-/*
- * This is horribly broken. See the comment on the same
- * brokenness in mm/mmap.c (essentially, this doesn't
- * work anyway for PROT_NONE and writable pages, and now
- * that we properly get the mmap semaphore it would just
- * lock up on us).
- *
- * Fix the same way.
- */
-		if (newflags & VM_LOCKED) {
-			while (start < end) {
-				int c;
-				get_user(c,(int *) start);
-				__asm__ __volatile__("": :"r" (c));
-				start += PAGE_SIZE;
-			}
-		}
-#endif
+		make_pages_present(start, end);
 	}
 	return retval;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov