diff options
author | csjp <csjp@FreeBSD.org> | 2005-10-04 14:47:47 +0000 |
---|---|---|
committer | csjp <csjp@FreeBSD.org> | 2005-10-04 14:47:47 +0000 |
commit | ac94e44f1fbe2173edc9c790a789d66973169f05 (patch) | |
tree | 0229dde705f25fd44d144358a6868d4a1ac42bcd | |
parent | 55a69cff021f4797ef2f5e2bd4e34d53b762a5cf (diff) | |
download | FreeBSD-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
-rw-r--r-- | sys/security/mac/mac_process.c | 5 |
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 |