Re: [PATCH] iommu: Make sysfs robust for non-API groups

From: Joerg Roedel
Date: Wed May 04 2022 - 09:18:46 EST


On Wed, May 04, 2022 at 01:39:58PM +0100, Robin Murphy wrote:
> Groups created by VFIO backends outside the core IOMMU API should never
> be passed directly into the API itself, however they still expose their
> standard sysfs attributes, so we can still stumble across them that way.
> Take care to consider those cases before jumping into our normal
> assumptions of a fully-initialised core API group.
>
> Fixes: 3f6634d997db ("iommu: Use right way to retrieve iommu_ops")
> Reported-by: Jan Stancek <jstancek@xxxxxxxxxx>
> Tested-by: Jan Stancek <jstancek@xxxxxxxxxx>
> Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Signed-off-by: Robin Murphy <robin.murphy@xxxxxxx>
> ---
>
> /me has a vested interest in not going backwards on dev_iommu_ops() :)
>
> drivers/iommu/iommu.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)

Applied, thanks.