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:
Bryan Drewery 2016-02-16 02:14:25 +00:00
parent e443683de2
commit a2109e0056

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