Re: [PATCH V2] iommu: sprd: release dma buffer to avoid memory leak

From: Baolu Lu
Date: Wed Mar 08 2023 - 21:09:16 EST


On 3/8/23 11:41 AM, Chunyan Zhang wrote:
Release page table DMA buffer when the IOMMU domain is not used:

- Domain freed.

- IOMMU is attaching to a new domain.
Since one sprd IOMMU servers only one client device, if the IOMMU has
been attached to other domain, it has to be detached first, that's
saying the DMA buffer should be released, otherwise that would
cause memory leak issue.

Signed-off-by: Chunyan Zhang<chunyan.zhang@xxxxxxxxxx>

Reviewed-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>

Best regards,
baolu