summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_mac.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2002-09-09 17:10:16 +0000
committerrwatson <rwatson@FreeBSD.org>2002-09-09 17:10:16 +0000
commitbb152917727d1faa614c80067f9ee9b60dcdb7c7 (patch)
treea66ccca98aaac8c7f09c84b1bc1c4402b34e6cab /sys/kern/kern_mac.c
parent03b3b7821749b83a01f99c9197e5913e82deef5b (diff)
downloadFreeBSD-src-bb152917727d1faa614c80067f9ee9b60dcdb7c7.zip
FreeBSD-src-bb152917727d1faa614c80067f9ee9b60dcdb7c7.tar.gz
Minor code sync to MAC tree: push Giant locking up from
mac_cred_mmapped_drop_perms() to the caller. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
Diffstat (limited to 'sys/kern/kern_mac.c')
-rw-r--r--sys/kern/kern_mac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_mac.c b/sys/kern/kern_mac.c
index c04294e..b3a5f65 100644
--- a/sys/kern/kern_mac.c
+++ b/sys/kern/kern_mac.c
@@ -2129,10 +2129,8 @@ mac_cred_mmapped_drop_perms(struct thread *td, struct ucred *cred)
{
/* XXX freeze all other threads */
- mtx_lock(&Giant);
mac_cred_mmapped_drop_perms_recurse(td, cred,
&td->td_proc->p_vmspace->vm_map);
- mtx_unlock(&Giant);
/* XXX allow other threads to continue */
}
@@ -3043,7 +3041,9 @@ __mac_set_proc(struct thread *td, struct __mac_set_proc_args *uap)
crhold(newcred);
PROC_UNLOCK(p);
+ mtx_lock(&Giant);
mac_cred_mmapped_drop_perms(td, newcred);
+ mtx_unlock(&Giant);
crfree(newcred); /* Free revocation reference. */
crfree(oldcred);
OpenPOWER on IntegriCloud