Page MenuHomeFreeBSD

vmm: Fix error handling in vmm_handler()
ClosedPublic

Authored by markj on Dec 31 2024, 3:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 30, 4:26 AM
Unknown Object (File)
Wed, Jan 29, 9:00 AM
Unknown Object (File)
Wed, Jan 22, 2:40 PM
Unknown Object (File)
Tue, Jan 21, 10:49 AM
Unknown Object (File)
Tue, Jan 21, 7:04 AM
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

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 Not Applicable
Unit
Tests Not Applicable

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.Jan 2 2025, 4:29 PM
jrtc27 added inline comments.
sys/riscv/vmm/vmm.c
271–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.