diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2022-11-15 14:31:41 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2022-11-15 14:31:41 +0000 |
commit | 60bae7ec045a8af6e9c51ac080e51948fe84bb4d (patch) | |
tree | e210786841c4fa58f0b75679196be904297f799c /sys/security | |
parent | c3f1a13902c15f350d59335e99c8945e515a915c (diff) | |
download | src-60bae7ec045a8af6e9c51ac080e51948fe84bb4d.tar.gz src-60bae7ec045a8af6e9c51ac080e51948fe84bb4d.zip |
mac_lomac: whack giant usage
It does not protect anything, the code looks dodgy regardless.
Diffstat (limited to 'sys/security')
-rw-r--r-- | sys/security/mac_lomac/mac_lomac.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/sys/security/mac_lomac/mac_lomac.c b/sys/security/mac_lomac/mac_lomac.c index 5efcfe385cd5..dffd06d964a2 100644 --- a/sys/security/mac_lomac/mac_lomac.c +++ b/sys/security/mac_lomac/mac_lomac.c @@ -2248,12 +2248,6 @@ lomac_thread_userret(struct thread *td) dodrop = 0; mtx_unlock(&subj->mtx); newcred = crget(); - /* - * Prevent a lock order reversal in mac_proc_vm_revoke; - * ideally, the other user of subj->mtx wouldn't be holding - * Giant. - */ - mtx_lock(&Giant); PROC_LOCK(p); mtx_lock(&subj->mtx); /* @@ -2275,7 +2269,6 @@ lomac_thread_userret(struct thread *td) PROC_UNLOCK(p); if (dodrop) mac_proc_vm_revoke(curthread); - mtx_unlock(&Giant); } else { mtx_unlock(&subj->mtx); } |