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)
Fri, Jan 10, 5:46 AM
Unknown Object (File)
Wed, Jan 1, 6:24 AM
Unknown Object (File)
Wed, Dec 25, 9:37 PM
Unknown Object (File)
Wed, Dec 25, 9:02 PM
Unknown Object (File)
Wed, Dec 25, 9:29 AM
Unknown Object (File)
Dec 9 2024, 12:21 PM
Unknown Object (File)
Nov 16 2024, 7:59 AM
Unknown Object (File)
Nov 12 2024, 8:14 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