HomeFreeBSD

nfscl: Acquire a refcount on "cred" for mirrored pNFS RPCs

Description

nfscl: Acquire a refcount on "cred" for mirrored pNFS RPCs

When the NFSv4.1/4.2 client is doing a pnfs mount to
mirrored DS(s), asynchronous threads are used to do the
RPCs against the DS(s) concurrently. If a DS is slow
to reply, it is possible for the "cred" to be free'd
before the asynchronous thread is done with it, causing
a panic/crash.

This patch fixes the problem by acquiring a refcount on
the "cred" while it is being used by the asynchronous thread
for a DS RPC. This bug was found during a recent IETF
NFSv4 testing event.

This bug only affects "pnfs" mounts to mirrored pNFS
servers.

MFC after: 2 weeks

Details

Provenance
rmacklemAuthored on May 3 2022, 2:22 PM
Parents
rG450b4ac23c75: bsdinstall/script: umount before zpool export
Branches
Unknown
Tags
Unknown