linux-stable/drivers/vfio
Xiaoyang Xu e9caa4e4ac vfio iommu type1: Fix memory leak in vfio_iommu_type1_pin_pages
[ Upstream commit 2e6cfd496f ]

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-29 09:07:12 +01:00
..
mdev vfio/mdev: Fix reference count leak in add_mdev_supported_type 2020-06-25 15:41:56 +02:00
pci vfio/pci: Clear token on bypass registration failure 2020-10-29 09:07:12 +01:00
platform vfio: platform: Fix reset module leak in error path 2018-08-03 07:50:22 +02:00
Kconfig
Makefile
vfio.c vfio: Fix WARNING "do not call blocking ops when !TASK_RUNNING" 2019-06-15 11:54:54 +02:00
vfio_iommu_spapr_tce.c vfio/spapr_tce: Get rid of possible infinite loop 2019-12-05 15:37:42 +01:00
vfio_iommu_type1.c vfio iommu type1: Fix memory leak in vfio_iommu_type1_pin_pages 2020-10-29 09:07:12 +01:00
vfio_spapr_eeh.c
virqfd.c