linux-stable/drivers/iommu/iommufd
Nicolin Chen 6129b59fcd iommufd: Use iommufd_access_change_ioas in iommufd_access_destroy_object
Update iommufd_access_destroy_object() to call the new
iommufd_access_change_ioas() helper.

It is impossible to legitimately race iommufd_access_destroy_object() with
iommufd_access_change_ioas() as iommufd_access_destroy_object() is only
called once the refcount reache zero, so any concurrent
iommufd_access_change_ioas() is already UAFing the memory.

Link: https://lore.kernel.org/r/f9fbeca2cde7f8515da18d689b3e02a6a40a5e14.1690523699.git.nicolinc@nvidia.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2023-07-28 13:31:24 -03:00
..
device.c iommufd: Use iommufd_access_change_ioas in iommufd_access_destroy_object 2023-07-28 13:31:24 -03:00
double_span.h
hw_pagetable.c iommufd: Add IOMMU_HWPT_ALLOC 2023-07-26 10:20:31 -03:00
io_pagetable.c iommufd: Allow passing in iopt_access_list_id to iopt_remove_access() 2023-07-28 13:31:24 -03:00
io_pagetable.h
ioas.c iommu/iommufd: Pass iommufd_ctx pointer in iommufd_get_ioas() 2023-03-29 16:52:41 -03:00
iommufd_private.h iommufd: Allow passing in iopt_access_list_id to iopt_remove_access() 2023-07-28 13:31:24 -03:00
iommufd_test.h iommufd/selftest: Return the real idev id from selftest mock_domain 2023-07-26 10:20:36 -03:00
Kconfig vfio: Compile vfio_group infrastructure optionally 2023-07-25 10:20:50 -06:00
main.c iommufd: Add IOMMU_HWPT_ALLOC 2023-07-26 10:20:31 -03:00
Makefile
pages.c mm/gup: remove unused vmas parameter from pin_user_pages_remote() 2023-06-09 16:25:25 -07:00
selftest.c iommufd/selftest: Return the real idev id from selftest mock_domain 2023-07-26 10:20:36 -03:00
vfio_compat.c iommu/iommufd: Pass iommufd_ctx pointer in iommufd_get_ioas() 2023-03-29 16:52:41 -03:00