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
This commit is contained in:
parent
238b89fcad
commit
1ed2e49b55
@ -749,7 +749,7 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data)
|
||||
|
||||
case PT_ATTACH:
|
||||
/* Self */
|
||||
if (p->p_pid == td->td_proc->p_pid) {
|
||||
if (p == td->td_proc) {
|
||||
error = EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user