aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/filemon/filemon.c
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2016-08-12 16:05:53 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2016-08-12 16:05:53 +0000
commitf566b25e0da88e6954bba6456460b503f5d1155a (patch)
treebb4da9d408b9f215c97c411ef76abd3a5824a6f9 /sys/dev/filemon/filemon.c
parent15919690b502a1b60b44d40ed9d8347f5aaaba80 (diff)
downloadsrc-f566b25e0da88e6954bba6456460b503f5d1155a.tar.gz
src-f566b25e0da88e6954bba6456460b503f5d1155a.zip
Avoid taking PROC_LOCK in syscalls if not being traced.
MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=304008
Diffstat (limited to 'sys/dev/filemon/filemon.c')
-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 919af9d6dbe6..26e1bc38d071 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);