mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Writes to p_flag in __setugid() no longer need Giant.
This commit is contained in:
parent
787f162df6
commit
e07c897e61
1 changed files with 0 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue