linux-yocto/drivers/vfio
Li RongQing f0af7f7ffc 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-27 11:07:11 +01:00
..
fsl-mc
mdev
pci hisi_acc_vfio_pci: add eq and aeq interruption restore 2025-06-27 11:07:11 +01:00
platform vfio/platform: check the bounds of read/write syscalls 2025-02-21 13:49:50 +01:00
container.c
iova_bitmap.c iommufd/iova_bitmap: Fix shift-out-of-bounds in iova_bitmap_offset_to_index() 2025-02-21 13:49:17 +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-27 11:07:11 +01:00
vfio_main.c
vfio_spapr_eeh.c
vfio.h
virqfd.c