svn commit: r289658 - head/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Tue Oct 20 20:12:43 UTC 2015
Author: kib
Date: Tue Oct 20 20:12:42 2015
New Revision: 289658
URL: https://svnweb.freebsd.org/changeset/base/289658
Log:
No need to dereference struct proc to pids when comparing processes
for equality.
Reviewed by: jhb, pho
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Modified:
head/sys/kern/sys_process.c
Modified: head/sys/kern/sys_process.c
==============================================================================
--- head/sys/kern/sys_process.c Tue Oct 20 19:52:59 2015 (r289657)
+++ head/sys/kern/sys_process.c Tue Oct 20 20:12:42 2015 (r289658)
@@ -749,7 +749,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