Page MenuHomeFreeBSD

vmm: Fix error handling in vmm_handler()
ClosedPublic

Authored by markj on Dec 31 2024, 3:37 PM.
Tags
None
Referenced Files
F109721797: D48269.id148814.diff
Sat, Feb 8, 6:03 PM
Unknown Object (File)
Sat, Feb 8, 10:12 AM
Unknown Object (File)
Wed, Feb 5, 12:01 AM
Unknown Object (File)
Sun, Feb 2, 6:37 PM
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

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.Jan 6 2025, 2:00 PM
This revision is now accepted and ready to land.Jan 9 2025, 11:40 AM
This revision was automatically updated to reflect the committed changes.