Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ac99078 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cma: Remove potential deadlock situation"

parents 5911c2fe 98bc05ed
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -591,10 +591,10 @@ bool dma_release_from_contiguous(struct device *dev, unsigned long pfn,

	VM_BUG_ON(pfn + count > cma->base_pfn + cma->count);

	mutex_lock(&cma_mutex);
	bitmap_clear(cma->bitmap, pfn - cma->base_pfn, count);
	if (cma->in_system)
		free_contig_range(pfn, count);
	mutex_lock(&cma_mutex);
	bitmap_clear(cma->bitmap, pfn - cma->base_pfn, count);
	mutex_unlock(&cma_mutex);

	return true;