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
F174476783: D30068.id88564.diff
Sat, Oct 3, 1:17 PM
Unknown Object (File)
Tue, Sep 29, 11:28 AM
Unknown Object (File)
Sun, Sep 27, 6:55 PM
Unknown Object (File)
Wed, Sep 9, 11:17 PM
Unknown Object (File)
Tue, Sep 8, 1:40 PM
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
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