summaryrefslogtreecommitdiffstats
path: root/sys/security/mac/mac_process.c
diff options
context:
space:
mode:
authorcsjp <csjp@FreeBSD.org>2005-10-04 14:47:47 +0000
committercsjp <csjp@FreeBSD.org>2005-10-04 14:47:47 +0000
commitac94e44f1fbe2173edc9c790a789d66973169f05 (patch)
tree0229dde705f25fd44d144358a6868d4a1ac42bcd /sys/security/mac/mac_process.c
parent55a69cff021f4797ef2f5e2bd4e34d53b762a5cf (diff)
downloadFreeBSD-src-ac94e44f1fbe2173edc9c790a789d66973169f05.zip
FreeBSD-src-ac94e44f1fbe2173edc9c790a789d66973169f05.tar.gz
Use the correct object's backing_object_offset while calculating offsets.
While we are here, add a note that we need to lock the object before walking the backing object list. Pointed out by: alc Discussed with: rwatson
Diffstat (limited to 'sys/security/mac/mac_process.c')
-rw-r--r--sys/security/mac/mac_process.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/security/mac/mac_process.c b/sys/security/mac/mac_process.c
index 170670c..67bda6f 100644
--- a/sys/security/mac/mac_process.c
+++ b/sys/security/mac/mac_process.c
@@ -354,9 +354,12 @@ mac_cred_mmapped_drop_perms_recurse(struct thread *td, struct ucred *cred,
object = vme->object.vm_object;
if (object == NULL)
continue;
+ /* XXXCSJP We need to lock the object before walking
+ * the backing object list.
+ */
while (object->backing_object != NULL) {
- object = object->backing_object;
offset += object->backing_object_offset;
+ object = object->backing_object;
}
/*
* At the moment, vm_maps and objects aren't considered
OpenPOWER on IntegriCloud