]> git.baikalelectronics.ru Git - kernel.git/commit
dma-coherent: catch oversized requests to dma_alloc_from_coherent()
authorJohannes Weiner <hannes@cmpxchg.org>
Tue, 6 Jan 2009 22:43:10 +0000 (14:43 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 6 Jan 2009 23:59:31 +0000 (15:59 -0800)
commitde8eaf49781b3727fa18a6e35a0f3cb49fba3c94
treec4f7fd8f6a24c5d242dd7bd0a876413f15e26fcd
parentc5d68467c96ff30c21534fd64c1692a45ebc88c4
dma-coherent: catch oversized requests to dma_alloc_from_coherent()

Prevent passing an order to bitmap_find_free_region() that is larger than
the actual bitmap can represent.

These requests can come from device drivers that have no idea how big the
dma region is and need to rely on dma_alloc_from_coherent() to sort it out
for them.

Reported-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/dma-coherent.c