From owner-svn-src-head@freebsd.org Tue Jan 31 15:22:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38EA7CCAB1F; Tue, 31 Jan 2017 15:22:53 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07214F47; Tue, 31 Jan 2017 15:22:52 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0VFMq34016830; Tue, 31 Jan 2017 15:22:52 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VFMqna016829; Tue, 31 Jan 2017 15:22:52 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201701311522.v0VFMqna016829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 31 Jan 2017 15:22:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313017 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 15:22:53 -0000 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); }