diff options
author | jake <jake@FreeBSD.org> | 2000-12-23 19:43:10 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2000-12-23 19:43:10 +0000 |
commit | fa7a58ab48542df270919dc02881d5c4a2d4f344 (patch) | |
tree | 51c7f08e6064351afd60db7b45fcd14756284805 /sys/kern/kern_fork.c | |
parent | 974f411f61d6549db784519d520f6a33719e3f6c (diff) | |
download | FreeBSD-src-fa7a58ab48542df270919dc02881d5c4a2d4f344.zip FreeBSD-src-fa7a58ab48542df270919dc02881d5c4a2d4f344.tar.gz |
Protect proc.p_pptr and proc.p_children/p_sibling with the
proctree_lock.
linprocfs not locked pending response from informal maintainer.
Reviewed by: jhb, -smp@
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r-- | sys/kern/kern_fork.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 60171a5..1c8cb38 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -476,8 +476,10 @@ again: pptr = initproc; else pptr = p1; + PROCTREE_LOCK(PT_EXCLUSIVE); p2->p_pptr = pptr; LIST_INSERT_HEAD(&pptr->p_children, p2, p_sibling); + PROCTREE_LOCK(PT_RELEASE); LIST_INIT(&p2->p_children); LIST_INIT(&p2->p_heldmtx); LIST_INIT(&p2->p_contested); |