HomeFreeBSD

devfs: Avoid comparison with an uninitialized var in devfs_fp_check()

Description

devfs: Avoid comparison with an uninitialized var in devfs_fp_check()

devvn_refthread() will initialize *devp only if it succeeds, so check for
success before comparing with fp->f_data. Other devvn_refthread()
callers are careful to do this.

Reported by: KMSAN
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30068

Details

Provenance
markjAuthored on May 3 2021, 4:43 PM
Reviewer
kib
Differential Revision
D30068: devfs: Avoid comparison with an uninitialized var in devfs_fp_check()
Parents
rG2b2d77e7204d: VOP_STAT: Provide a default value for va_gen
Branches
Unknown
Tags
Unknown