Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jan 2017 15:22:52 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r313017 - head/sys/compat/linux
Message-ID:  <201701311522.v0VFMqna016829@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701311522.v0VFMqna016829>