]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
iommu/arm-smmu: fix panic in arm_smmu_alloc_init_pte
authorBin Wang <binw@marvell.com>
Fri, 21 Mar 2014 10:06:07 +0000 (10:06 +0000)
committerWill Deacon <will.deacon@arm.com>
Tue, 15 Apr 2014 11:23:11 +0000 (12:23 +0100)
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>
drivers/iommu/arm-smmu.c

index 69d001a71b227a6057250a42f1df38b430a60180..647c3c7fd7428f31dd2b313a1fc8b29ac33b482c 100644 (file)
@@ -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);