Page MenuHomeFreeBSD

vmm: Fix error handling in vmm_handler()
ClosedPublic

Authored by markj on Tue, Dec 31, 3:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 11, 12:12 AM
Unknown Object (File)
Thu, Jan 9, 2:59 PM
Unknown Object (File)
Tue, Jan 7, 7:20 PM
Unknown Object (File)
Tue, Jan 7, 6:52 PM
Unknown Object (File)
Tue, Jan 7, 6:01 PM
Unknown Object (File)
Mon, Jan 6, 7:46 AM
Unknown Object (File)
Mon, Jan 6, 7:27 AM
Unknown Object (File)
Sun, Jan 5, 10:01 PM

Details

Summary

In commit a97f683fe3c4 I didn't add code to remove the vmmctl device
when vmm.ko is unloaded, so it would persist and prevent vmm.ko from
being re-loaded.

Extend vmmdev_cleanup() to destroy the vmmctl cdev. Also call
vmmdev_cleanup() if vmm_init() fails.

Fixes: a97f683fe3c4 ("vmm: Add a device file interface for creating and destroying VMs")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 61428
Build 58312: arc lint + arc unit

Event Timeline

sys/dev/vmm/vmm_dev.c
1003

Should this return error?

markj marked an inline comment as done.

Fix error return

This revision is now accepted and ready to land.Thu, Jan 2, 4:29 PM
jrtc27 added inline comments.
sys/riscv/vmm/vmm.c
272

This comment persists but the arm64 equivalent was removed

markj marked an inline comment as done.

Remove the todo comment from riscv as well.

This revision now requires review to proceed.Mon, Jan 6, 2:00 PM
This revision is now accepted and ready to land.Thu, Jan 9, 11:40 AM
This revision was automatically updated to reflect the committed changes.