HomeFreeBSD

file: Make fget*() and getvnode*() consistent about initializing *fpp

Description

file: Make fget*() and getvnode*() consistent about initializing *fpp

Most fget*() functions initialize the output parameter to NULL. Make
the externally visible interface behave consistently, and make
fget_unlocked_seq() private to kern_descrip.c.

This fixes at least one bug in a consumer, _filemon_wrapper_openat(),
which assumes that getvnode() sets the output file pointer to NULL upon
an error.

Reported by: syzbot+01c0459408f896a5933a@syzkaller.appspotmail.com
Reviewed by: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34190

Details

Provenance
markjAuthored on Feb 8 2022, 5:34 PM
Reviewer
kib
Differential Revision
D34190: file: Make fget*() and getvnode*() consistent about initializing *fpp
Parents
rG927aa5fefd4c: bhyve: Fix getaddrinfo() error handling
Branches
Unknown
Tags
Unknown