Skip to content

Commit

Permalink
iommu/arm-smmu: fix panic in arm_smmu_alloc_init_pte
Browse files Browse the repository at this point in the history
kernel panic happened when iommu_unmap a buffer larger than 2MB,
more than expected pmd entries got “invalidated”, due to a wrong range
passed to arm_smmu_alloc_init_pte. it was likely a typo, now we fix
it, passing the correct "end" address to arm_smmu_alloc_init_pte.

Signed-off-by: Bin Wang <binw@marvell.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
  • Loading branch information
Bin Wang authored and Will Deacon committed Apr 15, 2014
1 parent 16c50dc commit aca1bc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iommu/arm-smmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ static int arm_smmu_alloc_init_pmd(struct arm_smmu_device *smmu, pud_t *pud,

do {
next = pmd_addr_end(addr, end);
ret = arm_smmu_alloc_init_pte(smmu, pmd, addr, end, pfn,
ret = arm_smmu_alloc_init_pte(smmu, pmd, addr, next, pfn,
prot, stage);
phys += next - addr;
} while (pmd++, addr = next, addr < end);
Expand Down

0 comments on commit aca1bc4

Please sign in to comment.