Author: trasz
Date: Tue Jan 31 15:22:51 2017
New Revision: 313017
URL: https://svnweb.freebsd.org/changeset/base/313017

Log:
  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

Modified:
  head/sys/compat/linux/linux_misc.c

Modified: head/sys/compat/linux/linux_misc.c
==============================================================================
--- head/sys/compat/linux/linux_misc.c  Tue Jan 31 15:19:44 2017        
(r313016)
+++ head/sys/compat/linux/linux_misc.c  Tue Jan 31 15:22:51 2017        
(r313017)
@@ -1733,9 +1733,7 @@ linux_getppid(struct thread *td, struct 
                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);
 }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to