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 } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"