]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: dma-mapping: free allocated page if unable to map
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 22 Sep 2011 09:32:25 +0000 (10:32 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 26 Sep 2011 08:36:50 +0000 (09:36 +0100)
commitc36cc5d2c7c01f7f2ffef2f452f59de58a1ab3bc
treef3d0bd7bf530fe56dc6fba2f7701f0e6b82795d3
parent330a1adc0d8ed2f26b1203cfb157b2b7dffced32
ARM: dma-mapping: free allocated page if unable to map

If the attempt to map a page for DMA fails (eg, because we're out of
mapping space) then we must not hold on to the page we allocated for
DMA - doing so will result in a memory leak.

Cc: <stable@kernel.org>
Reported-by: Bryan Phillippe <bp@darkforest.org>
Tested-by: Bryan Phillippe <bp@darkforest.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/dma-mapping.c