From patchwork Tue Jan 9 10:43:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zeng Tao X-Patchwork-Id: 123804 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3481675qgn; Mon, 8 Jan 2018 18:42:43 -0800 (PST) X-Google-Smtp-Source: ACJfBosBFpJ8Wqpro3mr+pb+H6IOa8VM5TFyGSfA1hfYlJRSKRI3gECFPflVL6FDXKzT1Hudpq/x X-Received: by 10.84.130.6 with SMTP id 6mr14329872plc.134.1515465763723; Mon, 08 Jan 2018 18:42:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515465763; cv=none; d=google.com; s=arc-20160816; b=A8IJTdW5rzd8Q455nbGqBDKku6cND8PT9jtSJv28B4MiI178QxNx+yfswyzVjD4D/T 9QtdBfFC40kTdDa5E08pyOk1eTnCGtqqNTxDJY/8U4b18ZwtF+w0KC0N2L5XC+8MoVVE wvpjp8EiB5P3JYfL8uEisFhmiPL1eZaMqXNd6XeQFIqGpkxbdUC4TGdNFK4SShrhpdCg h77oGQmiWSAvrBQ3e383qxLPTPlRGINRtApm4SEnfmGCejylj3/U5F/7LXedGjg+LhBT lfOTIro6cjIuLlipZo+pMjbpPdhg8OYwaLJOTIUxxOwFp/Rut03xEsTXrdpVmuy7dw0j MMfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=Vgz5Q1vGWieMgJJWQBNN8fTVTOHsNVSNc536fmrPCN8=; b=CrwWzxJH1+qokSLkPiMzrxaoqUTzAfNH2Bf93GvxqoIoHtDOl5GncKRdLXnSmh8gqI ed5NZrvHXKEwZwD0tcE+duleaqEWVd3m4yU8UPwI+wH9adq+fc4o0GhMdWeHl/Jl5n5L 9DIX9PQn8CK/0F9in8c4EMe5mihF5Q7q7dHhcIi8VQW5Lbfi4tICQw9ttKS6NaFzLeYb 50OEvNeJP670acIN+mfv+8ws79duQYr13aZmPRDCyfQZLp6Hah10N91hf/wxLD+Teuhq eBqDh1YU3SIOic+jkO19GGL7ka+MJERG36p+Nn/ym1eSJvcWBYqbpGixy62TBqdwFO+1 p3yA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f10si8301382pgc.570.2018.01.08.18.42.43; Mon, 08 Jan 2018 18:42:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754625AbeAICml (ORCPT + 28 others); 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 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id F276271D1FC24; Tue, 9 Jan 2018 10:42:26 +0800 (CST) Received: from dessert.huawei.com (10.69.192.158) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.361.1; Tue, 9 Jan 2018 10:42:17 +0800 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 X-Originating-IP: [10.69.192.158] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.7.4 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;