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
F106099054: D30068.diff
Wed, Dec 25, 9:29 AM
Unknown Object (File)
Mon, Dec 9, 12:21 PM
Unknown Object (File)
Nov 16 2024, 7:59 AM
Unknown Object (File)
Nov 12 2024, 8:14 PM
Unknown Object (File)
Nov 10 2024, 3:48 PM
Unknown Object (File)
Oct 8 2024, 3:37 PM
Unknown Object (File)
Oct 8 2024, 3:37 PM
Unknown Object (File)
Oct 8 2024, 3:37 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 38954
Build 35843: arc lint + arc unit