Jason Gunthorpe 1baf6c5f7c iommufd: Add iopt_area_alloc()
[ Upstream commit 361d744ddd61de065fbeb042aaed590d32dd92ec ]

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: 51fe6141f0f6 ("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
..
2023-09-01 16:54:25 -07:00
2023-11-20 11:59:17 +01:00
2022-11-03 15:47:54 +01:00
2023-03-31 10:03:31 +02:00
2023-02-24 14:34:12 -08:00