diff options
author | Yunfei Wang <[email protected]> | 2021-12-07 19:33:15 +0800 |
---|---|---|
committer | Will Deacon <[email protected]> | 2021-12-14 14:45:35 +0000 |
commit | a556cfe4cabc6d79cbb7733f118bbb420b376fe6 (patch) | |
tree | 96d7f0c7f4bff0ceb31a0ff3b3f432b7a025f574 /net/lapb/lapb_in.c | |
parent | 17d9a4b43b284c333bf2c0c347da28bf22fe7a97 (diff) |
iommu/io-pgtable-arm-v7s: Add error handle for page table allocation failure
In __arm_v7s_alloc_table function:
iommu call kmem_cache_alloc to allocate page table, this function
allocate memory may fail, when kmem_cache_alloc fails to allocate
table, call virt_to_phys will be abnomal and return unexpected phys
and goto out_free, then call kmem_cache_free to release table will
trigger KE, __get_free_pages and free_pages have similar problem,
so add error handle for page table allocation failure.
Fixes: 29859aeb8a6e ("iommu/io-pgtable-arm-v7s: Abort allocation when table address overflows the PTE")
Signed-off-by: Yunfei Wang <[email protected]>
Cc: <[email protected]> # 5.10.*
Acked-by: Robin Murphy <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
Diffstat (limited to 'net/lapb/lapb_in.c')
0 files changed, 0 insertions, 0 deletions