linux/drivers/vfio
Daniel Jordan 8c6fd05cf8 vfio/type1: fix vaddr_get_pfns() return in vfio_pin_page_external()
commit 4ab4fcfce5 upstream.

vaddr_get_pfns() now returns the positive number of pfns successfully
gotten instead of zero.  vfio_pin_page_external() might return 1 to
vfio_iommu_type1_pin_pages(), which will treat it as an error, if
vaddr_get_pfns() is successful but vfio_pin_page_external() doesn't
reach vfio_lock_acct().

Fix it up in vfio_pin_page_external().  Found by inspection.

Fixes: be16c1fd99 ("vfio/type1: Change success value of vaddr_get_pfn()")
Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Message-Id: <20210308172452.38864-1-daniel.m.jordan@oracle.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-28 11:10:38 +02:00
..
fsl-mc vfio/fsl-mc: Re-order vfio_fsl_mc_probe() 2021-05-14 09:50:25 +02:00
mdev vfio/mdev: Make to_mdev_device() into a static inline 2022-08-21 15:16:07 +02:00
pci vfio/pci: Handle concurrent vma faults 2021-07-14 16:56:50 +02:00
platform amba: Make the remove callback return void 2022-04-08 14:40:02 +02:00
Kconfig vfio: Use config not menuconfig for VFIO_NOIOMMU 2021-09-18 13:40:12 +02:00
Makefile
vfio_iommu_spapr_tce.c
vfio_iommu_type1.c vfio/type1: fix vaddr_get_pfns() return in vfio_pin_page_external() 2022-09-28 11:10:38 +02:00
vfio_spapr_eeh.c
vfio.c vfio: Clear the caps->buf to NULL after free 2022-08-25 11:38:18 +02:00
virqfd.c