ARM: 8426/1: dma-mapping: add missing range check in dma_mmap()
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 28 Aug 2015 08:41:39 +0000 (09:41 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 3 Oct 2015 15:36:45 +0000 (16:36 +0100)
commit371f0f085f629fc0f66695f572373ca4445a67ad
tree502ee1051eeaf183b6581739a77880635cd4c62e
parentdb695c0509d6ec9046ee5e4c520a19fa17d9fce2
ARM: 8426/1: dma-mapping: add missing range check in dma_mmap()

dma_mmap() function in IOMMU-based dma-mapping implementation lacked
a check for valid range of mmap parameters (offset and buffer size), what
might have caused access beyond the allocated buffer. This patch fixes
this issue.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: stable@vger.kernel.org # v3.6+
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/dma-mapping.c