svn commit: r290323 - stable/10/sys/kern

Konstantin Belousov kib at FreeBSD.org
Tue Nov 3 08:28:49 UTC 2015


Author: kib
Date: Tue Nov  3 08:28:47 2015
New Revision: 290323
URL: https://svnweb.freebsd.org/changeset/base/290323

Log:
  MFC r289658:
  No need to dereference struct proc to pids when comparing processes
  for equality.

Modified:
  stable/10/sys/kern/sys_process.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/sys_process.c
==============================================================================
--- stable/10/sys/kern/sys_process.c	Tue Nov  3 05:25:06 2015	(r290322)
+++ stable/10/sys/kern/sys_process.c	Tue Nov  3 08:28:47 2015	(r290323)
@@ -748,7 +748,7 @@ kern_ptrace(struct thread *td, int req, 
 
 	case PT_ATTACH:
 		/* Self */
-		if (p->p_pid == td->td_proc->p_pid) {
+		if (p == td->td_proc) {
 			error = EINVAL;
 			goto fail;
 		}


More information about the svn-src-all mailing list