mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
mm: cma: allocation trigger
Provides a userspace interface to trigger a CMA allocation.
Usage:
echo [pages] > alloc
This would provide testing/fuzzing access to the CMA allocation paths.
Signed-off-by: Sasha Levin <[email protected]>
Acked-by: Joonsoo Kim <[email protected]>
Cc: Marek Szyprowski <[email protected]>
Cc: Laura Abbott <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
28b24c1fc8
commit
26b02a1f96
3 changed files with 63 additions and 1 deletions
6
mm/cma.c
6
mm/cma.c
|
|
@ -123,6 +123,12 @@ static int __init cma_activate_area(struct cma *cma)
|
|||
} while (--i);
|
||||
|
||||
mutex_init(&cma->lock);
|
||||
|
||||
#ifdef CONFIG_CMA_DEBUGFS
|
||||
INIT_HLIST_HEAD(&cma->mem_head);
|
||||
spin_lock_init(&cma->mem_head_lock);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
||||
err:
|
||||
|
|
|
|||
Loading…
Reference in a new issue