linux/drivers/iommu/iommufd
Jason Gunthorpe b4ff830eca iommufd: Do not add the same hwpt to the ioas->hwpt_list twice
The hwpt is added to the hwpt_list only during its creation, it is never
added again. This hunk is some missed leftover from rework. Adding it
twice will corrupt the linked list in some cases.

It effects HWPT specific attachment, which is something the test suite
cannot cover until we can create a legitimate struct device with a
non-system iommu "driver" (ie we need the bus removed from the iommu code)

Cc: stable@vger.kernel.org
Fixes: e8d5721003 ("iommufd: Add kAPI toward external drivers for physical devices")
Link: https://lore.kernel.org/r/1-v1-4336b5cb2fe4+1d7-iommufd_hwpt_jgg@nvidia.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reported-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2023-02-15 21:37:48 -04:00
..
device.c iommufd: Do not add the same hwpt to the ioas->hwpt_list twice 2023-02-15 21:37:48 -04:00
double_span.h
hw_pagetable.c
io_pagetable.c
io_pagetable.h
ioas.c
iommufd_private.h vfio: Support VFIO_NOIOMMU with iommufd 2023-02-03 15:45:23 -04:00
iommufd_test.h
Kconfig vfio: Support VFIO_NOIOMMU with iommufd 2023-02-03 15:45:23 -04:00
main.c iommufd: Add three missing structures in ucmd_buffer 2023-01-23 14:29:04 -04:00
Makefile
pages.c iommufd: Use GFP_KERNEL_ACCOUNT for iommu_map() 2023-01-25 11:52:04 +01:00
selftest.c
vfio_compat.c iommufd: Make sure to zero vfio_iommu_type1_info before copying to user 2023-02-14 16:49:55 -04:00