Use the 'traced' variable instead of comparing p->p_flag again.

Reviewed by:	kib
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D26577
This commit is contained in:
Edward Tomasz Napierala 2020-09-29 11:18:48 +00:00
parent c9370e5cec
commit 3409864922
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=366250

View File

@ -90,7 +90,7 @@ syscallenter(struct thread *td)
goto retval;
}
if (__predict_false((p->p_flag & P_TRACED) != 0)) {
if (__predict_false(traced)) {
PROC_LOCK(p);
if (p->p_ptevents & PTRACE_SCE)
ptracestop((td), SIGTRAP, NULL);