iommu: pcie: Fix incorrect kmemleak_ignore() usage
kmemleak_ignore() shouldn't be used on the gen_pool allocations since they aren't slab allocations. This leads to a flurry of warnings from kmemleak; fix it by using kmemleak_ignore() correctly. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
This commit is contained in:
parent
2f43de3476
commit
c3807312b1
1 changed files with 2 additions and 1 deletions
|
@ -691,6 +691,7 @@ static sysmmu_pte_t *alloc_lv2entry(struct exynos_iommu_domain *domain,
|
|||
if (!pent)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
kmemleak_ignore(pent);
|
||||
#else /* Use genpool */
|
||||
if (gen_pool_avail(lv2table_pool) >= LV2TABLE_AND_REFBUF_SZ) {
|
||||
pent = phys_to_virt(gen_pool_alloc(lv2table_pool,
|
||||
|
@ -700,6 +701,7 @@ static sysmmu_pte_t *alloc_lv2entry(struct exynos_iommu_domain *domain,
|
|||
pent = kmem_cache_zalloc(lv2table_kmem_cache, gfpmask);
|
||||
if (!pent)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
kmemleak_ignore(pent);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -707,7 +709,6 @@ static sysmmu_pte_t *alloc_lv2entry(struct exynos_iommu_domain *domain,
|
|||
pgtable_flush(sent, sent + 1);
|
||||
pgtable_flush(pent, pent + NUM_LV2ENTRIES);
|
||||
atomic_set(pgcounter, NUM_LV2ENTRIES);
|
||||
kmemleak_ignore(pent);
|
||||
}
|
||||
|
||||
return page_entry(sent, iova);
|
||||
|
|
Loading…
Reference in a new issue