If a process forks while being scanned, a non-zero p_lock will be inherited
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 14 Apr 2006 00:59:05 +0000 (00:59 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 14 Apr 2006 00:59:05 +0000 (00:59 +0000)
commit3a72e617328446b0d2bf3d4055beb7e81b523dba
tree30f205f5228e667e2ad5a8fa16eab52ffa05bc7f
parent61c6a8a9b417d9a1b8d1acced6167fce8cf5ae52
If a process forks while being scanned, a non-zero p_lock will be inherited
by the child process preventing it from being able to exit.  Make sure that
p_lock is zero'd on fork.

Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
Also-thanks-to: Peter Holms filesystem and load testing suite (stress2).
sys/kern/kern_fork.c