Filemon: Fix panic when fork1() is called from kproc_create().

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
bdrewery 2016-02-16 02:14:25 +00:00
parent 61b6a7adb2
commit a7044f8900

View File

@ -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);