Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Oct 2014 21:18:17 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272449 - head/sys/kern
Message-ID:  <201410022118.s92LIHrn010944@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Thu Oct  2 21:18:16 2014
New Revision: 272449
URL: https://svnweb.freebsd.org/changeset/base/272449

Log:
  Require p_cansched() for changing a process' protection status via
  procctl() rather than p_cansee().
  
  Submitted by:	rwatson
  MFC after:	3 days

Modified:
  head/sys/kern/sys_process.c

Modified: head/sys/kern/sys_process.c
==============================================================================
--- head/sys/kern/sys_process.c	Thu Oct  2 20:17:16 2014	(r272448)
+++ head/sys/kern/sys_process.c	Thu Oct  2 21:18:16 2014	(r272449)
@@ -1240,7 +1240,7 @@ protect_setchild(struct thread *td, stru
 {
 
 	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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410022118.s92LIHrn010944>