Protect allproc scans with PHOLD/PRELE, in particular to support the
authorMatthew Dillon <dillon@dragonflybsd.org>
Sat, 19 Nov 2005 17:58:33 +0000 (17:58 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sat, 19 Nov 2005 17:58:33 +0000 (17:58 +0000)
commite38910da2b3a546eab44c9ce8e26211ac92f49f7
tree4730f76be887fafcf414b217e3a7af3b6753c76c
parent16523a434bc79e848da515e446cfef6d5c68435f
Protect allproc scans with PHOLD/PRELE, in particular to support the
sysctl that fstat uses.

Add an additional wait state in exit1() when p_lock is non-zero.  Do not
remove the process from the allproc list until p_lock is zero in order to
protect allproc scans.

Remove a spurious PHOLD in the NFS code.  Generally clean up uses of PHOLD
that no longer apply.

Fstat problems reported by: Stefan Krueger <skrueger@meinberlikomm.de>
sys/dev/disk/fd/fd.c
sys/emulation/linux/i386/linprocfs/linprocfs_vnops.c
sys/kern/kern_descrip.c
sys/kern/kern_exit.c
sys/kern/kern_physio.c
sys/vfs/nfs/nfs_bio.c
sys/vfs/procfs/procfs_vnops.c
sys/vfs/ufs/ffs_rawread.c
sys/vm/vm_glue.c