Date: Fri, 29 May 2015 04:22:58 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283677 - stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace Message-ID: <201505290422.t4T4MwKt079546@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Fri May 29 04:22:57 2015 New Revision: 283677 URL: https://svnweb.freebsd.org/changeset/base/283677 Log: MFC r277915: Don't attempt to disable enabled fasttrap probes in an exiting process. MFC r277914: fasttrap_sigtrap(): use tdsendsignal() to send SIGTRAP. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Fri May 29 04:01:39 2015 (r283676) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Fri May 29 04:22:57 2015 (r283677) @@ -295,7 +295,7 @@ fasttrap_sigtrap(proc_t *p, kthread_t *t ksi->ksi_code = TRAP_DTRACE; ksi->ksi_addr = (caddr_t)pc; PROC_LOCK(p); - (void) tdksignal(t, SIGTRAP, ksi); + (void) tdsendsignal(p, t, SIGTRAP, ksi); PROC_UNLOCK(p); #endif } @@ -1296,8 +1296,13 @@ fasttrap_pid_disable(void *arg, dtrace_i */ if ((p = pfind(probe->ftp_pid)) != NULL) { #ifdef __FreeBSD__ - _PHOLD(p); - PROC_UNLOCK(p); + if (p->p_flag & P_WEXIT) { + PROC_UNLOCK(p); + p = NULL; + } else { + _PHOLD(p); + PROC_UNLOCK(p); + } #endif }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505290422.t4T4MwKt079546>