aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoonsoo Kim <iamjoonsoo.kim@lge.com>2014-05-29 02:29:18 -0400
committerMarek Szyprowski <m.szyprowski@samsung.com>2014-05-29 03:25:14 -0400
commitf70e3c4f8b6ab61f713e040822ec51f5de498146 (patch)
tree37664fdf197609d2d445e6bde8d0e96fa6928ef4
parentbb56d0dc23aa3428c0b1901414bfcf698eb693fb (diff)
CMA: correct unlock target
'cma: Remove potential deadlock situation' introduces per cma area mutex for bitmap management. It is good, but there is one mistake. When we can't find appropriate area in bitmap, we release cma_mutex global lock rather than cma->lock and this is a bug. So fix it. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
-rw-r--r--drivers/base/dma-contiguous.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c
index 7b0217c863a7..c34ec3364243 100644
--- a/drivers/base/dma-contiguous.c
+++ b/drivers/base/dma-contiguous.c
@@ -309,7 +309,7 @@ struct page *dma_alloc_from_contiguous(struct device *dev, int count,
309 pageno = bitmap_find_next_zero_area(cma->bitmap, cma->count, 309 pageno = bitmap_find_next_zero_area(cma->bitmap, cma->count,
310 start, count, mask); 310 start, count, mask);
311 if (pageno >= cma->count) { 311 if (pageno >= cma->count) {
312 mutex_unlock(&cma_mutex); 312 mutex_unlock(&cma->lock);
313 break; 313 break;
314 } 314 }
315 bitmap_set(cma->bitmap, pageno, count); 315 bitmap_set(cma->bitmap, pageno, count);