Skip to content

Commit d596e6a

Browse files
committed
BACKPORT: Fix merge Revert "mm/cma.c: remove redundant cma_mutex lock"
1 parent 5df8df4 commit d596e6a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mm/cma.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
535535
lru_cache_enable();
536536
goto out;
537537
}
538+
mutex_lock(&cma_mutex);
538539
ret = alloc_contig_range(pfn, pfn + count, MIGRATE_CMA, gfp_mask, &info);
539540
mutex_unlock(&cma_mutex);
540541
cma_info.nr_migrated += info.nr_migrated;

0 commit comments

Comments
 (0)