From: Russell King Date: Tue, 10 Mar 2015 16:41:35 +0000 (+0000) Subject: ARM: dma-api: fix off-by-one error in __dma_supported() X-Git-Tag: omap-for-v4.1/fixes-rc1~297^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bf1268f48ad9bf5d6401b4db913e6d85b0863f6;p=pandora-kernel.git ARM: dma-api: fix off-by-one error in __dma_supported() When validating the mask against the amount of memory we have available (so that we can trap 32-bit DMA addresses with >32-bits memory), we had not taken account of the fact that max_pfn is the maximum PFN number plus one that would be in the system. There are several references in the code which bear this out: mm/page_owner.c: for (; pfn < max_pfn; pfn++) { } arch/x86/kernel/setup.c: high_memory = (void *)__va(max_pfn * PAGE_SIZE - 1) Signed-off-by: Russell King --- Reading git-diff-tree failed