staging: ION: Sys_heap: fix the incorrect pool->gfp_mask setting
PATCH v2 1/1 staging: ION: Sys_heap: fix the incorrect pool->gfp_mask setting
The gfp_mask low order pool is overlapped by the high order inside the loop, so the gfp_mask of all pools are set to high_order_gfp_flags. And all the allcations will have no __GFP_RECLAIM flag, we will easily get the allocation failure problem with memory presure.
Changes since v1:
1. fix the tag
2. change the flags define based on the comment.
Fixes e7f63771b60e ("ION: Sys_heap: Add cached pool to spead up cached buffer alloc")
Signed-off-by Zeng Tao <[email protected]>
Cc stable <[email protected]>
--- drivers/staging/android/ion/ion_system_heap.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/android/ion/ion_system_heap.c +2 -0
@@ -305,6 +305,8 @@ static int ion_system_heap_create_pools(struct ion_page_pool **pools,if (orders[i] >4 ) gfp_flags = high_order_gfp_flags; +else + gfp_flags = low_order_gfp_flags; pool =ion_page_pool_create (gfp_flags, orders[i], cached);if (!pool)
Signature · 1 line
2.7.4