iommu: exynos: tell kmemleak to ignore 2nd level page tables
Subsystems (3)
PATCH 1/1 iommu: exynos: tell kmemleak to ignore 2nd level page tables
From: Colin Cross <[email protected]>
The pointers to the 2nd level page tables are converted to 1st level page table entries, which means kmemleak can't find them and assumes they have been leaked. Call kmemleak_ignore on the 2nd level page tables to prevent them from showing up in kmemleak reports.
Signed-off-by Colin Cross <[email protected]>
Signed-off-by Dmitry Torokhov <[email protected]>
--- drivers/iommu/exynos-iommu.c | 1 + 1 file changed, 1 insertion(+)
drivers/iommu/exynos-iommu.c +1 -0
@@ -855,6 +855,7 @@ static sysmmu_pte_t *alloc_lv2entry(struct exynos_iommu_domain *priv,return ERR_PTR (-ENOMEM ); *sent =mk_lv1ent_page (virt_to_phys (pent)); +kmemleak_ignore (pent); *pgcounter =NUM_LV2ENTRIES ;pgtable_flush (pent, pent +NUM_LV2ENTRIES );pgtable_flush (sent, sent +1 );
Signature · 5 lines
2.2.0.rc0.207.ga3a616c -- Dmitry
Quoted 7 lines · Dmitry Torokhov
From: Colin Cross <[email protected]>
The pointers to the 2nd level page tables are converted to 1st level page table entries, which means kmemleak can't find them and assumes they have been leaked. Call
kmemleak_ignoreon the 2nd level page tables to prevent them from showing up in kmemleak reports.
Quoted 5 lines
Signed-off-by Colin Cross <[email protected]>Signed-off-by Dmitry Torokhov <[email protected]>--- drivers/iommu/exynos-iommu.c | 1 + 1 file changed, 1 insertion(+)
Applied to arm/exynos, thanks.