summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2003-12-21 06:03:40 +0000
committeralc <alc@FreeBSD.org>2003-12-21 06:03:40 +0000
commita0a304d068b4e9f755b5738288170551934406e9 (patch)
treecb430a7ec89446b57c79be52561f82d667eaee0f /sys/vm
parent01301e761d4bfbbff04c75e6e5b447e3d65c5f90 (diff)
downloadFreeBSD-src-a0a304d068b4e9f755b5738288170551934406e9.zip
FreeBSD-src-a0a304d068b4e9f755b5738288170551934406e9.tar.gz
- Correct an error in mincore(2) that has existed since its introduction:
mincore(2) should check that the page is valid, not just allocated. Otherwise, it can return a false positive for a page that is not yet resident because it is being read from disk.
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_mmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c
index b46a663..ab876a5 100644
--- a/sys/vm/vm_mmap.c
+++ b/sys/vm/vm_mmap.c
@@ -875,7 +875,7 @@ RestartScan:
* if the page is resident, then gather information about
* it.
*/
- if (m) {
+ if (m != NULL && m->valid != 0) {
mincoreinfo = MINCORE_INCORE;
vm_page_lock_queues();
if (m->dirty ||
OpenPOWER on IntegriCloud