HomeFreeBSD

Fix the NFSv4 client to safely find processes.

Description

Fix the NFSv4 client to safely find processes.

r340744 broke the NFSv4 client, because it replaced pfind_locked() with a
call to pfind(), since pfind() acquires the sx lock for the pid hash and
the NFSv4 already holds a mutex when it does the call.
The patch fixes the problem by recreating a pfind_any_locked() and adding the
functions pidhash_slockall() and pidhash_sunlockall to acquire/release
all of the pid hash locks.
These functions are then used by the NFSv4 client instead of acquiring
the allproc_lock and calling pfind().

Reviewed by: kib, mjg
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D19887

Details

Provenance
rmacklemAuthored on
Reviewer
kib
Differential Revision
D19887: fix the NFSv4 client so that it doesn't call pfind() with a mutex held
Parents
rS346216: ld-elf.so: make LD_DEBUG always functional.
Branches
Unknown
Tags
Unknown