HomeFreeBSD

Fix possible crash for the NFSv4.1 pNFS client.

Description

Fix possible crash for the NFSv4.1 pNFS client.

If the nfsrpc_createlayoutrpc() call in nfsrpc_getcreatelayout() fails,
the code used nfhpp when it might be set NULL. This patch checks for
the error cases (laystat != 0) and avoids using nfhpp for the failure case.
This would only affect NFSv4.1 mounts with the "pnfs" option.
Found while testing the "umount -N" patch not yet in head.

MFC after: 2 weeks

Details

Provenance
rmacklemAuthored on
Parents
rS321674: MFV r321673:
Branches
Unknown
Tags
Unknown