Page MenuHomeFreeBSD

vmm: Use make_dev_s() to create vmm devices
ClosedPublic

Authored by markj on Aug 30 2024, 2:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 16, 2:22 PM
Unknown Object (File)
Thu, Jan 9, 7:50 PM
Unknown Object (File)
Dec 4 2024, 1:14 AM
Unknown Object (File)
Nov 29 2024, 7:53 AM
Unknown Object (File)
Nov 22 2024, 7:11 AM
Unknown Object (File)
Nov 19 2024, 9:31 PM
Unknown Object (File)
Nov 13 2024, 2:56 PM
Unknown Object (File)
Nov 12 2024, 2:18 PM
Subscribers

Details

Summary

This avoids creating windows where a device file is accessible but the
device-specific field is not set.

Now that vmmdev_mtx is a sleepable lock, avoid dropping it while
creating devices files. This makes it easier to handle races and
simplifies some code; for example, the VSC_LINKED flag is no longer
needed.

Suggested by: jhb

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb added a subscriber: jhb.

Hmm, so nothing was checking for si_drv1 being NULL in the cdevsw methods? Oof.

This revision is now accepted and ready to land.Aug 30 2024, 3:41 PM

Yikes indeed! Nice catch. It likely was usually fine, but yikes!

This revision was automatically updated to reflect the committed changes.