提交 f70e3c4f 编写于 作者: J Joonsoo Kim 提交者: Marek Szyprowski

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: NJoonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
上级 bb56d0dc
......@@ -309,7 +309,7 @@ struct page *dma_alloc_from_contiguous(struct device *dev, int count,
pageno = bitmap_find_next_zero_area(cma->bitmap, cma->count,
start, count, mask);
if (pageno >= cma->count) {
mutex_unlock(&cma_mutex);
mutex_unlock(&cma->lock);
break;
}
bitmap_set(cma->bitmap, pageno, count);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册