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)
Oct 8 2024, 3:37 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:21 PM
Unknown Object (File)
Oct 3 2024, 1:33 AM
Unknown Object (File)
Oct 2 2024, 12:18 PM
Unknown Object (File)
Oct 2 2024, 4:49 AM
Unknown Object (File)
Sep 29 2024, 2:32 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