Writes to p_flag in __setugid() no longer need Giant.

This commit is contained in:
John Baldwin 2003-10-23 21:20:34 +00:00
parent 787f162df6
commit e07c897e61

View file

@ -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);