[PATCH 08/11] iommu: Always destroy the iommu_group during iommu_release_device()
Tian, Kevin
kevin.tian at intel.com
Wed Apr 26 19:42:59 AEST 2023
> From: Jason Gunthorpe <jgg at nvidia.com>
> Sent: Thursday, April 20, 2023 12:12 AM
>
> Have release fully clean up the iommu related parts of the struct device,
> no matter what state they are in.
>
> POWER creates iommu_groups without drivers attached, and the next patch
> removes the open-coding of this same cleanup from POWER.
>
> Split the logic so that the three things owned by the iommu core are
> always cleaned up:
> - Any attached iommu_group
> - Any allocated dev->iommu, eg for fwsepc
> - Any attached driver via a struct group_device
>
> This fixes a bug where a fwspec created without an iommu_group being
> probed would not be freed.
>
> Signed-off-by: Jason Gunthorpe <jgg at nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian at intel.com>
More information about the Linuxppc-dev
mailing list