From adf02aa8e3c2d6def05e4fa07386823a658e087f Mon Sep 17 00:00:00 2001 From: alc Date: Thu, 28 Nov 2002 08:01:39 +0000 Subject: [PATCH] Lock page field accesses in mincore(). Approved by: re (blanket) --- sys/vm/vm_mmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index b9b26bf8ba55..1f9f428b7191 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -883,6 +883,7 @@ mincore(td, uap) pindex = OFF_TO_IDX(offset); m = vm_page_lookup(current->object.vm_object, pindex); + vm_page_lock_queues(); /* * if the page is resident, then gather information about * it. @@ -898,6 +899,7 @@ mincore(td, uap) mincoreinfo |= MINCORE_REFERENCED_OTHER; } } + vm_page_unlock_queues(); } /*