linux/drivers/iommu/iommufd
Jason Gunthorpe 1baf6c5f7c iommufd: Add iopt_area_alloc()
[ Upstream commit 361d744ddd ]

We never initialize the two interval tree nodes, and zero fill is not the
same as RB_CLEAR_NODE. This can hide issues where we missed adding the
area to the trees. Factor out the allocation and clear the two nodes.

Fixes: 51fe6141f0 ("iommufd: Data structure to provide IOVA to PFN mapping")
Link: https://lore.kernel.org/r/20231030145035.GG691768@ziepe.ca
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:59:17 +01:00
..
device.c VFIO updates for v6.6-rc1 2023-08-30 20:36:01 -07:00
double_span.h
hw_pagetable.c iommufd: Add IOMMU_HWPT_ALLOC 2023-07-26 10:20:31 -03:00
io_pagetable.c iommufd: Add iopt_area_alloc() 2023-11-20 11:59:17 +01: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 VFIO updates for v6.6-rc1 2023-08-30 20:36:01 -07:00
iommufd_test.h iommufd/selftest: Add coverage for IOMMU_GET_HW_INFO ioctl 2023-08-18 12:52:15 -03:00
Kconfig vfio: Compile vfio_group infrastructure optionally 2023-07-25 10:20:50 -06:00
main.c VFIO updates for v6.6-rc1 2023-08-30 20:36:01 -07:00
Makefile
pages.c iommufd: Add iopt_area_alloc() 2023-11-20 11:59:17 +01:00
selftest.c iommufd/selftest: Don't leak the platform device memory when unloading the module 2023-08-18 12:56:24 -03:00
vfio_compat.c vfio: align capability structures 2023-08-17 12:17:44 -06:00