Page MenuHomeFreeBSD

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

Authored by markj on May 1 2021, 2:19 PM.

Details

Summary

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

Reported by: KMSAN

Diff Detail

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.