Page MenuHomeFreeBSD

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

Authored by markj on May 1 2021, 2:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 5, 11:59 PM
Unknown Object (File)
Sat, Sep 5, 9:17 PM
Unknown Object (File)
Sat, Sep 5, 5:33 PM
Unknown Object (File)
Sat, Sep 5, 1:51 PM
Unknown Object (File)
Sat, Sep 5, 1:05 PM
Unknown Object (File)
Thu, Sep 3, 9:17 PM
Unknown Object (File)
Thu, Sep 3, 12:32 PM
Unknown Object (File)
Wed, Sep 2, 8:24 PM
Subscribers

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
Lint Not Applicable
Unit
Tests Not Applicable