]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
cma: Remove potential deadlock situation
authorLaura Abbott <lauraa@codeaurora.org>
Tue, 25 Feb 2014 19:01:19 +0000 (11:01 -0800)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 15 May 2014 10:14:21 +0000 (12:14 +0200)
commit7ee793a62fa8c544f8b844e6e87b2d8e8836b219
tree5885be219592f9cf5a1cb2f81efda7148ad3019a
parentd6d211db37e75de2ddc3a4f979038c40df7cc79c
cma: Remove potential deadlock situation

CMA locking is currently very coarse. The cma_mutex protects both
the bitmap and avoids concurrency with alloc_contig_range. There
are several situations which may result in a deadlock on the CMA
mutex currently, mostly involving AB/BA situations with alloc and
free. Fix this issue by protecting the bitmap with a mutex per CMA
region and use the existing mutex for protecting against concurrency
with alloc_contig_range.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
drivers/base/dma-contiguous.c