linux-yocto/drivers/vfio
Li RongQing 801677040b vfio/type1: Fix error unwind in migration dirty bitmap allocation
[ Upstream commit 4518e5a60c ]

When setting up dirty page tracking at the vfio IOMMU backend for
device migration, if an error is encountered allocating a tracking
bitmap, the unwind loop fails to free previously allocated tracking
bitmaps.  This occurs because the wrong loop index is used to
generate the tracking object.  This results in unintended memory
usage for the life of the current DMA mappings where bitmaps were
successfully allocated.

Use the correct loop index to derive the tracking object for
freeing during unwind.

Fixes: d6a4c18566 ("vfio iommu: Implementation of ioctl for dirty pages tracking")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Link: https://lore.kernel.org/r/20250521034647.2877-1-lirongqing@baidu.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-19 15:28:17 +02:00
..
cdx
fsl-mc
mdev
pci hisi_acc_vfio_pci: bugfix live migration function without VF device driver 2025-06-19 15:28:16 +02:00
platform Revert "vfio/platform: check the bounds of read/write syscalls" 2025-02-21 13:57:27 +01:00
container.c
device_cdev.c
group.c
iommufd.c
iova_bitmap.c iommufd/iova_bitmap: Fix shift-out-of-bounds in iova_bitmap_offset_to_index() 2025-02-08 09:52:22 +01:00
Kconfig
Makefile
vfio_iommu_spapr_tce.c
vfio_iommu_type1.c vfio/type1: Fix error unwind in migration dirty bitmap allocation 2025-06-19 15:28:17 +02:00
vfio_main.c
vfio.h
virqfd.c