mirror of
https://github.com/torvalds/linux.git
synced 2026-11-25 07:52:34 +00:00
ashmem_pin() is calling range_shrink() without checking whether range_alloc() succeeded. Also, doing memory allocation with ashmem_mutex held should be avoided because ashmem_shrink_scan() tries to hold it. Therefore, move memory allocation for range_alloc() to ashmem_pin_unpin() and make range_alloc() not to fail. This patch is mostly meant for backporting purpose for fuzz testing on stable/distributor kernels, for there is a plan to remove this code in near future. Signed-off-by: Tetsuo Handa <[email protected]> Cc: [email protected] Reviewed-by: Joel Fernandes <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>