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
F169465042: D46488.id142670.diff
Tue, Sep 1, 2:53 PM
F169375190: D46488.diff
Tue, Sep 1, 8:54 AM
F169296311: D46488.id142625.diff
Tue, Sep 1, 3:47 AM
Unknown Object (File)
Mon, Aug 31, 2:01 PM
Unknown Object (File)
Sun, Aug 30, 6:30 AM
Unknown Object (File)
Sun, Aug 30, 5:08 AM
Unknown Object (File)
Fri, Aug 28, 9:43 AM
Unknown Object (File)
Thu, Aug 27, 11:33 AM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 59245
Build 56132: arc lint + arc unit

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.