From 87da2c3cf37429dd7554a13d8b70a046ccc3edcf Mon Sep 17 00:00:00 2001 From: alc Date: Thu, 24 Apr 2003 04:31:25 +0000 Subject: - Acquire the vm_object's lock when performing vm_object_page_clean(). - Add a parameter to vm_pageout_flush() that tells vm_pageout_flush() whether its caller has locked the vm_object. (This is a temporary measure to bootstrap vm_object locking.) --- sys/security/mac/mac_framework.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/security/mac/mac_framework.c') diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c index 9289d7f..15c95a0 100644 --- a/sys/security/mac/mac_framework.c +++ b/sys/security/mac/mac_framework.c @@ -2093,11 +2093,13 @@ mac_cred_mmapped_drop_perms_recurse(struct thread *td, struct ucred *cred, */ vm_object_reference(object); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); + VM_OBJECT_LOCK(object); vm_object_page_clean(object, OFF_TO_IDX(offset), OFF_TO_IDX(offset + vme->end - vme->start + PAGE_MASK), OBJPC_SYNC); + VM_OBJECT_UNLOCK(object); VOP_UNLOCK(vp, 0, td); vm_object_deallocate(object); /* -- cgit v1.1