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:Patrick Daly <pdaly@codeaurora.org>
Loading
Please register or sign in to comment