Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755178AbeAIDac (ORCPT + 1 other); Mon, 8 Jan 2018 22:30:32 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:43534 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754151AbeAIDab (ORCPT ); Mon, 8 Jan 2018 22:30:31 -0500 Subject: Re: [PATCH] ION: Sys_heap: fix the incorrect pool->gfp_mask setting To: Zeng Tao , , , , , , References: <1515494623-8383-1-git-send-email-prime.zeng@hisilicon.com> CC: , From: Chen Feng Message-ID: <5A543741.9060806@hisilicon.com> Date: Tue, 9 Jan 2018 11:30:09 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1515494623-8383-1-git-send-email-prime.zeng@hisilicon.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.142.193.64] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 2018/1/9 18:43, Zeng Tao wrote: > 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. > Thanks > 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; Not define here. Better "gfp_flags = low_order_gfp_flags" > > if (orders[i] > 4) > gfp_flags = high_order_gfp_flags; >