diff options
author | alc <alc@FreeBSD.org> | 2013-06-04 17:23:09 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2013-06-04 17:23:09 +0000 |
commit | feb6576ac7f0a71ab975784e250eb58c7c9d7640 (patch) | |
tree | b7e5435bad880f70ecec0c5111badac13ea435e3 /sys/security | |
parent | 7261ab42543c1ec698defc56e20c424f8b7cb937 (diff) | |
download | FreeBSD-src-feb6576ac7f0a71ab975784e250eb58c7c9d7640.zip FreeBSD-src-feb6576ac7f0a71ab975784e250eb58c7c9d7640.tar.gz |
Relax the vm object locking in mac_proc_vm_revoke_recurse(). A read lock
suffices in one place.
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sys/security')
-rw-r--r-- | sys/security/mac/mac_process.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/security/mac/mac_process.c b/sys/security/mac/mac_process.c index 15f704d..1a760cf 100644 --- a/sys/security/mac/mac_process.c +++ b/sys/security/mac/mac_process.c @@ -284,14 +284,14 @@ mac_proc_vm_revoke_recurse(struct thread *td, struct ucred *cred, object = vme->object.vm_object; if (object == NULL) continue; - VM_OBJECT_WLOCK(object); + VM_OBJECT_RLOCK(object); while ((backing_object = object->backing_object) != NULL) { - VM_OBJECT_WLOCK(backing_object); + VM_OBJECT_RLOCK(backing_object); offset += object->backing_object_offset; - VM_OBJECT_WUNLOCK(object); + VM_OBJECT_RUNLOCK(object); object = backing_object; } - VM_OBJECT_WUNLOCK(object); + VM_OBJECT_RUNLOCK(object); /* * At the moment, vm_maps and objects aren't considered by * the MAC system, so only things with backing by a normal |