Require p_cansched() for changing a process' protection status via

procctl() rather than p_cansee().

Submitted by:	rwatson
MFC after:	3 days
This commit is contained in:
John Baldwin 2014-10-02 21:18:16 +00:00
parent 4f7bf7a846
commit 7aa1071e48

View File

@ -1240,7 +1240,7 @@ protect_setchild(struct thread *td, struct proc *p, int flags)
{
PROC_LOCK_ASSERT(p, MA_OWNED);
if (p->p_flag & P_SYSTEM || p_cansee(td, p) != 0)
if (p->p_flag & P_SYSTEM || p_cansched(td, p) != 0)
return (0);
if (flags & PPROT_SET) {
p->p_flag |= P_PROTECTED;