linux-stable/drivers/vfio
Alexey Kardashevskiy 78becab98b vfio/spapr_tce: Fix incorrect tce_iommu_group memory free
The @tcegrp variable is used in 1) a loop over attached groups
2) it stores a pointer to a newly allocated tce_iommu_group if 1) found
nothing. However the error handler does not distinguish how we got there
and incorrectly releases memory for a found+incompatible group.

This fixes it by adding another error handling case.

Fixes: 0bd971676e ("powerpc/powernv/npu: Add compound IOMMU groups")
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2019-08-19 13:32:52 -06:00
..
mdev VFIO updates for v5.3-rc1 2019-07-17 11:23:13 -07:00
pci vfio: vfio_pci_nvlink2: use a vma helper function 2019-07-02 11:44:12 -06:00
platform treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
Kconfig docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vfio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vfio_iommu_spapr_tce.c vfio/spapr_tce: Fix incorrect tce_iommu_group memory free 2019-08-19 13:32:52 -06:00
vfio_iommu_type1.c mm: add account_locked_vm utility function 2019-07-16 19:23:25 -07:00
vfio_spapr_eeh.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
virqfd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00