summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2016-08-19 19:19:17 +0000
committerbdrewery <bdrewery@FreeBSD.org>2016-08-19 19:19:17 +0000
commitf817bdec719b90f4eb28973c11ec05511fb3d24d (patch)
tree3a710a8c5064c5621b1726d3f751ec8d0ca9ba33
parenta90c57525ca27b5a1bc2ebaf7e570fd9a5441801 (diff)
downloadFreeBSD-src-f817bdec719b90f4eb28973c11ec05511fb3d24d.zip
FreeBSD-src-f817bdec719b90f4eb28973c11ec05511fb3d24d.tar.gz
MFS r304474:
MFC r304008: Avoid taking PROC_LOCK in syscalls if not being traced. Approved by: re (XXX)
-rw-r--r--sys/dev/filemon/filemon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/filemon/filemon.c b/sys/dev/filemon/filemon.c
index 919af9d..26e1bc3 100644
--- a/sys/dev/filemon/filemon.c
+++ b/sys/dev/filemon/filemon.c
@@ -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);
OpenPOWER on IntegriCloud