ANDROID: iommu/io-pgtable-arm: Fix arguments for __arm_lpae_map()

arm_lpae_map_pages() is currently passing NULL to __arm_lpae_map()
for its mapped argument, instead of the mapped argument that it is
supposed to pass, which can lead to memory that has been mapped
not being counted as mapped.

Fix this by passing the mapped argument from arm_lpae_map_pages()
to __arm_lpae_map().

Bug: 178537788
Reported-by: John Stultz <john.stultz@linaro.org>
Fixes: ac3994447c ("FROMLIST: iommu/io-pgtable-arm: Implement arm_lpae_map_pages()")
Change-Id: Ic97df34fc2e9e0404d193eff2024d334e3e75a24
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
Isaac J. Manjarres
2021-04-12 17:09:26 -07:00
parent 40537e85f7
commit 947f7639b3

View File

@@ -497,7 +497,7 @@ static int arm_lpae_map_pages(struct io_pgtable_ops *ops, unsigned long iova,
prot = arm_lpae_prot_to_pte(data, iommu_prot);
ret = __arm_lpae_map(data, iova, paddr, pgsize, pgcount, prot, lvl,
ptep, gfp, NULL);
ptep, gfp, mapped);
/*
* Synchronise all PTE updates for the new mapping before there's
* a chance for anything to kick off a table walk for the new iova.