Re: [PATCH] iommu: __iommu_attach_group: check for non-NULL blocking_domain
From: Jason Gunthorpe
Date: Mon Sep 29 2025 - 08:07:38 EST
On Mon, Sep 29, 2025 at 10:23:47AM +0200, Hans Verkuil wrote:
> Since I am unfamiliar with the iommu core code, I am uncertain whether I am
> just papering over a bug elsewhere, or whether this is really the correct solution.
It is papering over something, group->domain is not supposed to be
NULL at this point.. That probably means the iommu driver has not been
fully setup yet.
This is ARM32? It should have gone down this path:
static int iommu_get_default_domain_type(struct iommu_group *group,
int target_type)
{
if (IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)) {
static_assert(!(IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU) &&
IS_ENABLED(CONFIG_IOMMU_DMA)));
driver_type = IOMMU_DOMAIN_IDENTITY;
And I thought there shouldn't be a way to get here:
> drivers/media/platform/ti/omap3isp/isp.c, function isp_attach_iommu().
With a NULL group->domain?
Maybe it didn't call iommu_setup_default_domain() in the right
sequence for some reason?
Can you inspect around this?
Jason