Hi Lukasz,
On 04.03.2020 23:00, Lukasz Luba wrote:
There is a memory leak which left some objects not freed. The reference
counter of mapping: 'mapping->kref' was 2 when calling
arm_iommu_detach_device(), so the release_iommu_mapping() won't be called.
Since the old mapping structure is not going to be used any more (because
it is detached and new one attached), call arm_iommu_release_mapping()
to trigger cleanup.
This will break IOMMU support in Exynos DRM if deferred probe happens.
Here is a proper fix:
https://patchwork.kernel.org/patch/11415715/
The mapping initially created by DMA-mapping framework should be
attached back when Exynos DRM releases the subdev device.