kernel-fxtec-pro1x/drivers/vfio
Xiaoyang Xu 707f8d0d38 vfio iommu type1: Fix memory leak in vfio_iommu_type1_pin_pages
[ Upstream commit 2e6cfd496f5b57034cf2aec738799571b5a52124 ]

pfn is not added to pfn_list when vfio_add_to_pfn_list fails.
vfio_unpin_page_external will exit directly without calling
vfio_iova_put_vfio_pfn.  This will lead to a memory leak.

Fixes: a54eb55045 ("vfio iommu type1: Add support for mediated devices")
Signed-off-by: Xiaoyang Xu <xuxiaoyang2@huawei.com>
[aw: simplified logic, add Fixes]
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-30 10:38:23 +01:00
..
mdev
pci vfio/pci: Clear token on bypass registration failure 2020-10-30 10:38:23 +01:00
platform
Kconfig
Makefile
vfio.c
vfio_iommu_spapr_tce.c
vfio_iommu_type1.c vfio iommu type1: Fix memory leak in vfio_iommu_type1_pin_pages 2020-10-30 10:38:23 +01:00
vfio_spapr_eeh.c
virqfd.c