Don't attempt to disable enabled fasttrap probes in an exiting process.

There's no need to do so, and we can't hold an exiting process, so this
race can result in panics.

MFC after:	1 week
This commit is contained in:
Mark Johnston 2015-01-30 05:03:23 +00:00
parent 1eb8ad64ea
commit a70a59ea73
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=277915

View File

@ -1296,8 +1296,13 @@ fasttrap_pid_disable(void *arg, dtrace_id_t id, void *parg)
*/
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
}