Re: [PATCH v6 01/11] iommu: Add dma ownership management interfaces

Christoph Hellwig
2022-02-19T07:32:12Z

The overall API and patch looks fine, but:

> + * iommu_group_dma_owner_claimed() - Query group dma ownership status
> + * @group: The group.
> + *
> + * This provides status query on a given group. It is racey and only for
> + * non-binding status reporting.

s/racey/racy/

> + */
> +bool iommu_group_dma_owner_claimed(struct iommu_group *group)
> +{
> + unsigned int user;
> +
> + mutex_lock(&group->mutex);
> + user = group->owner_cnt;
> + mutex_unlock(&group->mutex);
> +
> + return user;
> +}
> +EXPORT_SYMBOL_GPL(iommu_group_dma_owner_claimed);

Still no no need for the lock here.