mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-17 06:48:51 +00:00
runtime-rs: do unregister device in Trait Device/detach
Fixes: #7218 Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
This commit is contained in:
@@ -482,7 +482,7 @@ impl Device for VfioDevice {
|
||||
|
||||
async fn detach(
|
||||
&mut self,
|
||||
_pcie_topo: &mut Option<&mut PCIeTopology>,
|
||||
pcie_topo: &mut Option<&mut PCIeTopology>,
|
||||
h: &dyn hypervisor,
|
||||
) -> Result<Option<u64>> {
|
||||
if self
|
||||
@@ -505,6 +505,8 @@ impl Device for VfioDevice {
|
||||
None
|
||||
};
|
||||
|
||||
unregister_pcie_device!(self, pcie_topo)?;
|
||||
|
||||
Ok(device_index)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user