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, Apr 18, 5:02 AM
Unknown Object (File)
Sun, Apr 12, 6:16 PM
Unknown Object (File)
Sat, Apr 11, 11:39 PM
Unknown Object (File)
Fri, Apr 10, 10:45 PM
Unknown Object (File)
Mon, Apr 6, 7:42 PM
Unknown Object (File)
Mon, Apr 6, 4:03 PM
Unknown Object (File)
Mon, Apr 6, 1:45 PM
Unknown Object (File)
Mon, Apr 6, 10:17 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