> From: Jason Gunthorpe <j...@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 <j...@nvidia.com>

Reviewed-by: Kevin Tian <kevin.t...@intel.com>

Reply via email to