mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-22 05:30:24 +00:00
DM: release mevent when doing virtual device deinit
When doing warm reboot, the mevent module will not be deinitialized. We need to delete all mevent registered while deinit virutal device. Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
parent
e65b98bf36
commit
097aee76bf
@ -766,6 +766,13 @@ virtio_console_close_all(struct virtio_console *console)
|
||||
|
||||
be = (struct virtio_console_backend *)port->arg;
|
||||
if (be) {
|
||||
if (be->evp) {
|
||||
if (be->fd != STDIN_FILENO)
|
||||
mevent_delete_close(be->evp);
|
||||
else
|
||||
mevent_delete(be->evp);
|
||||
}
|
||||
|
||||
virtio_console_close_backend(be);
|
||||
free(be);
|
||||
}
|
||||
|
@ -1093,6 +1093,9 @@ virtio_net_deinit(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
||||
} else
|
||||
fprintf(stderr, "net->tapfd is -1!\n");
|
||||
|
||||
if (net->mevp != NULL)
|
||||
mevent_delete(net->mevp);
|
||||
|
||||
free(net);
|
||||
|
||||
DPRINTF(("%s: done\n", __func__));
|
||||
|
Loading…
Reference in New Issue
Block a user