Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c2e37c9 authored by qqzhou's avatar qqzhou
Browse files

arm: dma-mapping: Add iova checks in arm_iommu_map_sg



In arm_iommu_map_sg(), will execute __alloc_iova() and
then use this returned iova to execute iommu_map_sg(),
when this iova is DMA_ERROR_CODE, the value is 0xffffffff,
pgsize will be zero and then issue happens.

For the DMA_ERROR_CODE iova value, should not be allowed
to map sg, add checks to avoid it.

Change-Id: Ic1620075080b88b4dbcff4f5a909dd8149b70507
Signed-off-by: default avatarQingqing Zhou <qqzhou@codeaurora.org>
parent 9b0f7eab
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment