summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index e522d91..ce7d453 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -1066,7 +1066,6 @@ proc_to_reap(struct thread *td, struct proc *p, idtype_t idtype, id_t id,
proc_reap(td, p, status, options);
return (-1);
}
- PROC_UNLOCK(p);
return (1);
}
@@ -1199,7 +1198,7 @@ loop:
return (0);
}
- PROC_LOCK(p);
+ PROC_LOCK_ASSERT(p, MA_OWNED);
if ((options & (WTRAPPED | WUNTRACED)) != 0)
PROC_SLOCK(p);
@@ -1259,6 +1258,7 @@ loop:
if (ret != 0) {
KASSERT(ret != -1, ("reaped an orphan (pid %d)",
(int)td->td_retval[0]));
+ PROC_UNLOCK(p);
nfound++;
break;
}
OpenPOWER on IntegriCloud