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)
Mon, Oct 13, 9:56 PM
Unknown Object (File)
Mon, Oct 13, 9:55 PM
Unknown Object (File)
Mon, Oct 13, 9:55 PM
Unknown Object (File)
Mon, Oct 13, 8:18 AM
Unknown Object (File)
Tue, Oct 7, 4:29 AM
Unknown Object (File)
Tue, Oct 7, 2:09 AM
Unknown Object (File)
Thu, Sep 25, 3:04 PM
Unknown Object (File)
Thu, Sep 25, 7:18 AM
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