Home
last modified time | relevance | path

Searched hist:"676 bd99178cd962ed24ffdad222b7069d330a969" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/mm/
H A Ddmapool.cdiff 676bd99178cd962ed24ffdad222b7069d330a969 Thu Oct 01 17:37:19 CDT 2015 Robin Murphy <robin.murphy@arm.com> dmapool: fix overflow condition in pool_find_page()

If a DMA pool lies at the very top of the dma_addr_t range (as may
happen with an IOMMU involved), the calculated end address of the pool
wraps around to zero, and page lookup always fails.

Tweak the relevant calculation to be overflow-proof.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>