I some circumstances, mincore can succeed when it shouldn't. Example: Two files are mmapped to a process and they are adjacent in memory. If mincore is run with a requested length that is too large, the function does not differentiate between the different file pointers within the different vma structures and inappropriately returns success. The attached patch, against 2.6.20.3, fixes this behavior. This behavior was found when running the Linux Test Project's mincore01 on an IA32 system. Test 3 "unexpectedly" succeeds. -- Bruce