From owner-svn-src-all@freebsd.org Thu Jun 21 21:07:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECD1C1000502; Thu, 21 Jun 2018 21:07:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A00DD8E446; Thu, 21 Jun 2018 21:07:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 81026172BF; Thu, 21 Jun 2018 21:07:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5LL7Q6q051960; Thu, 21 Jun 2018 21:07:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5LL7Qoe051958; Thu, 21 Jun 2018 21:07:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806212107.w5LL7Qoe051958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 21 Jun 2018 21:07:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335503 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 335503 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 21:07:27 -0000 Author: kib Date: Thu Jun 21 21:07:25 2018 New Revision: 335503 URL: https://svnweb.freebsd.org/changeset/base/335503 Log: Update proc->p_ptevents annotation to reflect the actual locking. Submitted by: Yanko Yankulov Reviewed by: jhb MFC after: 1 week Differential revision: https://reviews.freebsd.org/D15954 Modified: head/sys/kern/sys_process.c head/sys/sys/proc.h Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Thu Jun 21 21:03:58 2018 (r335502) +++ head/sys/kern/sys_process.c Thu Jun 21 21:07:25 2018 (r335503) @@ -688,6 +688,7 @@ void proc_set_traced(struct proc *p, bool stop) { + sx_assert(&proctree_lock, SX_XLOCKED); PROC_LOCK_ASSERT(p, MA_OWNED); p->p_flag |= P_TRACED; if (stop) Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Thu Jun 21 21:03:58 2018 (r335502) +++ head/sys/sys/proc.h Thu Jun 21 21:07:25 2018 (r335503) @@ -633,7 +633,7 @@ struct proc { u_int p_stype; /* (c) Stop event type. */ char p_step; /* (c) Process is stopped. */ u_char p_pfsflags; /* (c) Procfs flags. */ - u_int p_ptevents; /* (c) ptrace() event mask. */ + u_int p_ptevents; /* (c + e) ptrace() event mask. */ struct nlminfo *p_nlminfo; /* (?) Only used by/for lockd. */ struct kaioinfo *p_aioinfo; /* (y) ASYNC I/O info. */ struct thread *p_singlethread;/* (c + j) If single threading this is it */