Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F96234802
D35186.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D35186.diff
View Options
diff --git a/sys/amd64/vmm/vmm_dev.c b/sys/amd64/vmm/vmm_dev.c
--- a/sys/amd64/vmm/vmm_dev.c
+++ b/sys/amd64/vmm/vmm_dev.c
@@ -1052,10 +1052,7 @@
}
/*
- * The 'cdev' will be destroyed asynchronously when 'si_threadcount'
- * goes down to 0 so we should not do it again in the callback.
- *
- * Setting 'sc->cdev' to NULL is also used to indicate that the VM
+ * Setting 'sc->cdev' to NULL is used to indicate that the VM
* is scheduled for destruction.
*/
cdev = sc->cdev;
@@ -1063,21 +1060,19 @@
mtx_unlock(&vmmdev_mtx);
/*
- * Schedule all cdevs to be destroyed:
+ * Destroy all cdevs:
*
* - any new operations on the 'cdev' will return an error (ENXIO).
*
- * - when the 'si_threadcount' dwindles down to zero the 'cdev' will
- * be destroyed and the callback will be invoked in a taskqueue
- * context.
- *
* - the 'devmem' cdevs are destroyed before the virtual machine 'cdev'
*/
SLIST_FOREACH(dsc, &sc->devmem, link) {
KASSERT(dsc->cdev != NULL, ("devmem cdev already destroyed"));
- destroy_dev_sched_cb(dsc->cdev, devmem_destroy, dsc);
+ destroy_dev(dsc->cdev);
+ devmem_destroy(dsc);
}
- destroy_dev_sched_cb(cdev, vmmdev_destroy, sc);
+ destroy_dev(cdev);
+ vmmdev_destroy(sc);
error = 0;
out:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 25, 4:17 AM (21 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12729728
Default Alt Text
D35186.diff (1 KB)
Attached To
Mode
D35186: vmm: Destroy character devices synchronously.
Attached
Detach File
Event Timeline
Log In to Comment