Author: trasz
Date: Tue Sep 29 11:18:48 2020
New Revision: 366250
URL: https://svnweb.freebsd.org/changeset/base/366250

Log:
  Use the 'traced' variable instead of comparing p->p_flag again.
  
  Reviewed by:  kib
  Sponsored by: DARPA
  Differential Revision:        https://reviews.freebsd.org/D26577

Modified:
  head/sys/kern/subr_syscall.c

Modified: head/sys/kern/subr_syscall.c
==============================================================================
--- head/sys/kern/subr_syscall.c        Tue Sep 29 10:07:46 2020        
(r366249)
+++ head/sys/kern/subr_syscall.c        Tue Sep 29 11:18:48 2020        
(r366250)
@@ -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);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to