From owner-svn-src-stable@FreeBSD.ORG Mon Jun 15 18:16:24 2015 Return-Path: Delivered-To: svn-src-stable@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A5E25FC; Mon, 15 Jun 2015 18:16:24 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 48110A5A; Mon, 15 Jun 2015 18:16:24 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5FIGOsD088429; Mon, 15 Jun 2015 18:16:24 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5FIGNlC088427; Mon, 15 Jun 2015 18:16:23 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201506151816.t5FIGNlC088427@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 15 Jun 2015 18:16:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284418 - in stable/10/sys: fs/procfs kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2015 18:16:24 -0000 Author: delphij Date: Mon Jun 15 18:16:23 2015 New Revision: 284418 URL: https://svnweb.freebsd.org/changeset/base/284418 Log: MFC r283889,r283891: Clear p_stops when doing PT_DETACH and PROCFS_CTL_DETACH. Without this, if a process was being traced by truss(1), which uses different p_stops bits than gdb(1), the latter would misbehave because of the unexpected bits. Reported by: jceel Submitted by: sef Sponsored by: iXsystems, Inc. Modified: stable/10/sys/fs/procfs/procfs_ctl.c stable/10/sys/kern/sys_process.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/procfs/procfs_ctl.c ============================================================================== --- stable/10/sys/fs/procfs/procfs_ctl.c Mon Jun 15 15:34:20 2015 (r284417) +++ stable/10/sys/fs/procfs/procfs_ctl.c Mon Jun 15 18:16:23 2015 (r284418) @@ -235,6 +235,7 @@ out: } else PROC_LOCK(p); p->p_oppid = 0; + p->p_stops = 0; p->p_flag &= ~P_WAITED; /* XXX ? */ sx_xunlock(&proctree_lock); Modified: stable/10/sys/kern/sys_process.c ============================================================================== --- stable/10/sys/kern/sys_process.c Mon Jun 15 15:34:20 2015 (r284417) +++ stable/10/sys/kern/sys_process.c Mon Jun 15 18:16:23 2015 (r284418) @@ -963,6 +963,7 @@ kern_ptrace(struct thread *td, int req, CTR1(KTR_PTRACE, "PT_DETACH: pid %d", p->p_pid); p->p_oppid = 0; p->p_flag &= ~(P_TRACED | P_WAITED | P_FOLLOWFORK); + p->p_stops = 0; /* should we send SIGCHLD? */ /* childproc_continued(p); */