summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-01-09 12:07:59 -0200
committerRenato Botelho <renato@netgate.com>2017-01-09 12:07:59 -0200
commitbaeac042059786f1ed0cca7ca4a4a32721362cab (patch)
tree3b848bddaf0f478d0c0651c8ee62129d3d9bacf5 /sys/kern/kern_exit.c
parent1af1408e09373ae856cfef567d79849c7e7e0d25 (diff)
parentf91948fdd5322d9aae1e8785976df69612c1999f (diff)
downloadFreeBSD-src-baeac042059786f1ed0cca7ca4a4a32721362cab.zip
FreeBSD-src-baeac042059786f1ed0cca7ca4a4a32721362cab.tar.gz
Merge remote-tracking branch 'origin/stable/11' into devel-11
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