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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Dec 2015 18:40:07 +0000 (13:40 -0500)
commit98cc6d31fa7dde7beb1bccc51ad5c858d9ae5b04
tree4e10205f3d7a1a81b5d11864930558c2c97ab5e8
parentc79f626810b7d20aca9cd935d8cfc3272ba7a054
ARM: 8426/1: dma-mapping: add missing range check in dma_mmap()

commit 371f0f085f629fc0f66695f572373ca4445a67ad upstream.

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>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/mm/dma-mapping.c