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

Skip to content
Commit c331dcf0 authored by Patrick Daly's avatar Patrick Daly
Browse files

dma-iommu: Fix off-by-one error



Commit 757c370f ("iommu/iova: Sort out rbtree limit_pfn handling")
altered iova->dma_32bit_pfn to be an exlusive limit, meaning it is
greater than the largest valid pfn.

Commit 30e3ad55 ("dma-iommu: Ensure iova is within given range")
derives limit_pfn from the minimum of the device's dma mask, an
inclusive limit, and iova->dma_32bit_pfn, which is now a exlusive limit.

This results in an off by one error, and allows an iova past the end
of the valid address range to be returned.

Change-Id: I591449b3bc4149baf4a70c9587677a028c2132e9
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent b8f54403
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