Skip to content

Commit aca1bc4

Browse files
Bin Wangwildea01
authored andcommitted
iommu/arm-smmu: fix panic in arm_smmu_alloc_init_pte
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 <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent 16c50dc commit aca1bc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/arm-smmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ static int arm_smmu_alloc_init_pmd(struct arm_smmu_device *smmu, pud_t *pud,
13811381

13821382
do {
13831383
next = pmd_addr_end(addr, end);
1384-
ret = arm_smmu_alloc_init_pte(smmu, pmd, addr, end, pfn,
1384+
ret = arm_smmu_alloc_init_pte(smmu, pmd, addr, next, pfn,
13851385
prot, stage);
13861386
phys += next - addr;
13871387
} while (pmd++, addr = next, addr < end);

0 commit comments

Comments
 (0)