linux-yocto/drivers/vfio
Li RongQing d796723b14 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:05:13 +01:00
..
fsl-mc
mdev
pci vfio/pci: Handle INTx IRQ_NOTCONNECTED 2025-06-04 14:37:56 +02:00
platform vfio/platform: check the bounds of read/write syscalls 2025-03-13 12:50:32 +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:05:13 +01:00
vfio_spapr_eeh.c
vfio.c
virqfd.c