aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2017-01-31 15:22:51 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2017-01-31 15:22:51 +0000
commit5db72ef2e42f53ea494c6a7ade67469ef70ff4a6 (patch)
tree9aaebd886808461594a03791551b0db603904f8d
parentfc8bde8ffe6e9b08a92227675ebaf367881f06f6 (diff)
downloadsrc-5db72ef2e42f53ea494c6a7ade67469ef70ff4a6.tar.gz
src-5db72ef2e42f53ea494c6a7ade67469ef70ff4a6.zip
Fix linux_getppid() to debug the actual parent, even it was reparented
by debugger. Reviewed by: dchagin@ MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9361
Notes
Notes: svn path=/head/; revision=313017
-rw-r--r--sys/compat/linux/linux_misc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index e61d3630a728..1e6822fa4f02 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -1733,9 +1733,7 @@ linux_getppid(struct thread *td, struct linux_getppid_args *args)
printf(ARGS(getppid, ""));
#endif
- PROC_LOCK(td->td_proc);
- td->td_retval[0] = td->td_proc->p_pptr->p_pid;
- PROC_UNLOCK(td->td_proc);
+ td->td_retval[0] = kern_getppid(td);
return (0);
}