MFC r277915:
Don't attempt to disable enabled fasttrap probes in an exiting process. MFC r277914: fasttrap_sigtrap(): use tdsendsignal() to send SIGTRAP.
This commit is contained in:
parent
9bbe24351d
commit
ec234b9b79
@ -295,7 +295,7 @@ fasttrap_sigtrap(proc_t *p, kthread_t *t, uintptr_t pc)
|
||||
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_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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user