[patch 1/1] arm: bcmring: Fix locking in dma_unmap

Leo (Hao) Chen leochen at broadcom.com
Fri Jan 29 15:22:32 EST 2010


Thanks Thomas for fixing this bug.

Acked-by: Leo Chen <leochen at broadcom.com>

On Fri, Jan 29, 2010 at 03:28:45AM -0800, Thomas Gleixner wrote:
> dma_unmap is missing a down(&memMap->lock).
> 
> Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
> Cc: Leo Chen <leochen at broadcom.com>
> Cc: Scott Branden <sbranden at broadcom.com>
> Cc: linux-arm-kernel at lists.infradead.org
> ---
>  arch/arm/mach-bcmring/dma.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> Index: linux-2.6-tip/arch/arm/mach-bcmring/dma.c
> ===================================================================
> --- linux-2.6-tip.orig/arch/arm/mach-bcmring/dma.c
> +++ linux-2.6-tip/arch/arm/mach-bcmring/dma.c
> @@ -2225,6 +2225,8 @@ int dma_unmap(DMA_MemMap_t *memMap,	/* S
>  	DMA_Region_t *region;
>  	DMA_Segment_t *segment;
>  
> +	down(&memMap->lock);
> +
>  	for (regionIdx = 0; regionIdx < memMap->numRegionsUsed; regionIdx++) {
>  		region = &memMap->region[regionIdx];
>  
> 
> 
> 

-- 

Leo Hao Chen

------------------------
Life is short, run long.




More information about the linux-arm-kernel mailing list