Message ID | 20191212054047.26202-1-wens@kernel.org (mailing list archive) |
---|---|
State | Mainlined |
Commit | f3cc4e1d44a813a0685f2e558b78ace3db559722 |
Headers | show |
Series | [v2] ARM: dma-api: fix max_pfn off-by-one error in __dma_supported() | expand |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index e822af0d9219..9414d72f664b 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -221,7 +221,7 @@ EXPORT_SYMBOL(arm_coherent_dma_ops); static int __dma_supported(struct device *dev, u64 mask, bool warn) { - unsigned long max_dma_pfn = min(max_pfn, arm_dma_pfn_limit); + unsigned long max_dma_pfn = min(max_pfn - 1, arm_dma_pfn_limit); /* * Translate the device's DMA mask to a PFN limit. This