Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754625AbeAICml (ORCPT + 1 other); Mon, 8 Jan 2018 21:42:41 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:58317 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754508AbeAICmk (ORCPT ); Mon, 8 Jan 2018 21:42:40 -0500 From: Zeng Tao To: , , , , , CC: , , Subject: [PATCH] ION: Sys_heap: fix the incorrect pool->gfp_mask setting Date: Tue, 9 Jan 2018 18:43:43 +0800 Message-ID: <1515494623-8383-1-git-send-email-prime.zeng@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.158] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: This issue is introduced by the commit ("ION: Sys_heap: Add cached pool to spead up cached buffer alloc"), 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. Signed-off-by: Zeng Tao --- drivers/staging/android/ion/ion_system_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c index 4dc5d7a..b6386be 100644 --- a/drivers/staging/android/ion/ion_system_heap.c +++ b/drivers/staging/android/ion/ion_system_heap.c @@ -298,10 +298,10 @@ static int ion_system_heap_create_pools(struct ion_page_pool **pools, bool cached) { int i; - gfp_t gfp_flags = low_order_gfp_flags; for (i = 0; i < NUM_ORDERS; i++) { struct ion_page_pool *pool; + gfp_t gfp_flags = low_order_gfp_flags; if (orders[i] > 4) gfp_flags = high_order_gfp_flags; -- 2.7.4