cloud-hypervisor/pci/src
Bo Chen 06f57abdf9 pci: vfio: Fix potential mmap leaks from the mmio regions
We can return prematurely from 'map_mmio_regions()' (e.g. when a mmap call
failed for vfio or 'create_user_memory_region()' failed for vfio-user)
without updating the 'MmioRegion::user_memory_regions' with the
information of previous successful mmaps, which in turn would cause mmap
leaks particularly for the case of hotplug where the 'vmm' thread will
keep running. To fix the issue, let's keep 'MmioRegion::user_memory_regions'
updated right after successful mmap calls.

Fixes: #4068

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-05-06 08:57:16 +02:00
..
bus.rs pci: Replace BAR tuple with PciBarConfiguration 2022-04-19 12:54:09 -07:00
configuration.rs vmm: Use new Resource type PciBar 2022-04-19 12:54:09 -07:00
device.rs vmm: Use new Resource type PciBar 2022-04-19 12:54:09 -07:00
lib.rs pci, vmm: Update DeviceNode to store PciBdf instead of u32 2022-02-16 11:57:23 +00:00
msi.rs pci: msi: Implement Snapshot for MsiConfig 2022-04-22 16:16:48 +02:00
msix.rs vm-device, pci, devices: Remove InterruptSourceGroup::{un}mask 2022-04-11 22:56:48 +01:00
vfio_user.rs pci: vfio: Fix potential mmap leaks from the mmio regions 2022-05-06 08:57:16 +02:00
vfio.rs pci: vfio: Fix potential mmap leaks from the mmio regions 2022-05-06 08:57:16 +02:00