Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jun 2018 15:03:06 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r335818 - in stable/11/sys: kern sys
Message-ID:  <201806301503.w5UF36NP091559@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sat Jun 30 15:03:06 2018
New Revision: 335818
URL: https://svnweb.freebsd.org/changeset/base/335818

Log:
  MFC r335503:
  Update proc->p_ptevents annotation to reflect the actual locking.

Modified:
  stable/11/sys/kern/sys_process.c
  stable/11/sys/sys/proc.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/sys_process.c
==============================================================================
--- stable/11/sys/kern/sys_process.c	Sat Jun 30 14:55:47 2018	(r335817)
+++ stable/11/sys/kern/sys_process.c	Sat Jun 30 15:03:06 2018	(r335818)
@@ -689,6 +689,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: stable/11/sys/sys/proc.h
==============================================================================
--- stable/11/sys/sys/proc.h	Sat Jun 30 14:55:47 2018	(r335817)
+++ stable/11/sys/sys/proc.h	Sat Jun 30 15:03:06 2018	(r335818)
@@ -669,7 +669,7 @@ struct proc {
 	 */
 	LIST_ENTRY(proc) p_orphan;	/* (e) List of orphan processes. */
 	LIST_HEAD(, proc) p_orphans;	/* (e) Pointer to list of orphans. */
-	u_int		p_ptevents;	/* (c) ptrace() event mask. */
+	u_int		p_ptevents;	/* (c + e) ptrace() event mask. */
 	uint16_t	p_elf_machine;	/* (x) ELF machine type */
 	uint64_t	p_elf_flags;	/* (x) ELF flags */
 	sigqueue_t	p_sigqueue;	/* (c) Sigs not delivered to a td. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806301503.w5UF36NP091559>