svn commit: r304473 - stable/10/sys/dev/filemon

Bryan Drewery bdrewery at FreeBSD.org
Fri Aug 19 17:02:06 UTC 2016


Author: bdrewery
Date: Fri Aug 19 17:02:05 2016
New Revision: 304473
URL: https://svnweb.freebsd.org/changeset/base/304473

Log:
  MFC r304008:
  
    Avoid taking PROC_LOCK in syscalls if not being traced.

Modified:
  stable/10/sys/dev/filemon/filemon.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/filemon/filemon.c
==============================================================================
--- stable/10/sys/dev/filemon/filemon.c	Fri Aug 19 17:01:13 2016	(r304472)
+++ stable/10/sys/dev/filemon/filemon.c	Fri Aug 19 17:02:05 2016	(r304473)
@@ -137,6 +137,8 @@ filemon_proc_get(struct proc *p)
 {
 	struct filemon *filemon;
 
+	if (p->p_filemon == NULL)
+		return (NULL);
 	PROC_LOCK(p);
 	filemon = filemon_acquire(p->p_filemon);
 	PROC_UNLOCK(p);


More information about the svn-src-stable-10 mailing list