Skip to contentSkip to conversation

arm: bcmring: Fix locking in dma_unmap

PATCH New Leo (Hao) Chen 1 participant 1 message Jan 29, 2010 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

PATCH 1/1 arm: bcmring: Fix locking in dma_unmap

Thanks Thomas for fixing this bug.

Quoted 26 lines · Thomas Gleixner

dma_unmap is missing a down(&memMap->lock).

Cc Leo Chen <[email protected]>
Cc Scott Branden <[email protected]>
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
===================================================================

arch/arm/mach-bcmring/dma.c +2 -0
@@ -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];
 
Signature · 4 lines
Leo Hao Chen

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