HomeFreeBSD

nfsd: Fix handling of the error case for nfsvno_open

Description

nfsd: Fix handling of the error case for nfsvno_open

Using done_namei instead of ni_startdir did not
fix the crashes reported in the PR. Upon looking
more closely at the code, the only case where the
code near the end of nfsvno_open() needs to be
executed is when nfsvno_namei() has succeeded,
but a subsequent error was detected.

This patch uses done_namei to indicate this case.

Also, nfsvno_relpathbuf() should only be called for
this case and not whenever nfsvno_open() is called
with nd_repstat != 0. A bug was introduced here when
the HASBUF flag was deleted.

Reviewed by: mjg
PR: 268971
Tested by: ish@amail.plala.or.jp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D38430

Details

Provenance
rmacklemAuthored on Feb 8 2023, 9:06 PM
Reviewer
mjg
Differential Revision
D38430: fix crashes caused by not setting done_namei correctly
Parents
rGfa3f6655421f: netmap: drop redundant if_mtu assignment
Branches
Unknown
Tags
Unknown