aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2016-02-16 02:14:25 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2016-02-16 02:14:25 +0000
commita2109e005640502c016dfc9ce8de0ec19a36a4ef (patch)
treefba9bdf1785616a5875fe9db9d5414b8034b1561
parente443683de29e666bca5e740dffcb96f2b286a659 (diff)
downloadsrc-a2109e005640502c016dfc9ce8de0ec19a36a4ef.tar.gz
src-a2109e005640502c016dfc9ce8de0ec19a36a4ef.zip
Filemon: Fix panic when fork1() is called from kproc_create().
MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=295649
-rw-r--r--sys/dev/filemon/filemon_wrapper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/filemon/filemon_wrapper.c b/sys/dev/filemon/filemon_wrapper.c
index 1b9877a68592..7419ccb53703 100644
--- a/sys/dev/filemon/filemon_wrapper.c
+++ b/sys/dev/filemon/filemon_wrapper.c
@@ -96,7 +96,7 @@ filemon_pid_check(struct proc *p)
return (NULL);
}
sx_slock(&proctree_lock);
- while (p != initproc) {
+ while (p->p_pid != 0) {
TAILQ_FOREACH(filemon, &filemons_inuse, link) {
if (p == filemon->p) {
sx_sunlock(&proctree_lock);