From e07c897e61361afcfaadb834b8a1f085711f0aaa Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 23 Oct 2003 21:20:34 +0000 Subject: [PATCH] Writes to p_flag in __setugid() no longer need Giant. --- sys/kern/kern_prot.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 601b98ab15b..4a09fbc54a8 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1173,18 +1173,14 @@ __setugid(struct thread *td, struct __setugid_args *uap) p = td->td_proc; switch (uap->flag) { case 0: - mtx_lock(&Giant); PROC_LOCK(p); p->p_flag &= ~P_SUGID; PROC_UNLOCK(p); - mtx_unlock(&Giant); return (0); case 1: - mtx_lock(&Giant); PROC_LOCK(p); p->p_flag |= P_SUGID; PROC_UNLOCK(p); - mtx_unlock(&Giant); return (0); default: return (EINVAL);