Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit fe676929 authored by Jeremy Gebben's avatar Jeremy Gebben Committed by David Keitel
Browse files

iommu/arm-smmu: fix a DOMAIN_ATTR_DYNAMIC memory leak



The pagetable memory for a domain is freed by free_io_pgtable_ops(), which
is only called from arm_smmu_destroy_domain_context().  This function also
cleans up the hardware's context bank state and it is called during
iommu_device_detach().  Because dynamic domains don't have context bank
state, they don't call arm_smmu_destroy_domain_context() and thus their
pagetable memory was leaked.

Fix this by instead calling free_io_pgtable_ops() during
iommu_domain_destroy().  This ensures that the pagetable is freed for all
domains.

Change-Id: Id349fdc7df673cd4513468f23dcc95a9281d2657
Signed-off-by: default avatarJeremy Gebben <jgebben@codeaurora.org>
parent 599de5c6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment