Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2047212rwb; Sun, 18 Sep 2022 21:05:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7IUrJJeJCRjbNW7v9m36FHmBGmo46GMTjFzHcf6cOh2TGJe8v4lX49T3NKkkcXkHsl7GtM X-Received: by 2002:a17:90b:1b10:b0:200:934b:741f with SMTP id nu16-20020a17090b1b1000b00200934b741fmr18230952pjb.212.1663560318727; Sun, 18 Sep 2022 21:05:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663560318; cv=none; d=google.com; s=arc-20160816; b=pk/aQm3PInMKohXfFjlw+gxeelnSg5/f2SSpGZTRTUt2jS3u3rOy+ZVpbcUNpCPceM i8WCs02Em2jkLDiEu7r6uU0+aUVveC4Viy8+2XlYUJJ9M7Vz+Iyljma3t0sXvME8saS6 3VyEoif2r5cFjXeWBg4dJeSwZlZTZ2Yc3tZTpfZHYM41BawAbqV8x1fAusSMzP6SSxwx NHnwCqpHygJVrAfnE8q2zDze/ZHAiL6pVMqaawsR06vu1mGVYDHWDmatrylottVbryvo HlpCUh/zWJJ96XQXanGwK8PhfgbeqDHG5/pzUWiBFM1UKVr3FEvpiBk26NnJ1yGNPvgA NHrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:to:from; bh=lWf9ai8KEHZ+UIEULA1F8GUYL8n1KBwQJ7QtrWucvx4=; b=FqUdPqb3DaKyxHGAlGdfDvi8RNYJBNWSwvqgx3K3eusuT6B4z7rB4UNOAHec/2eqVh KlVpARRkhgIqbUeDDafUXnamNLth9t/sBfaZBjLHu438p3tu/UqzhMoRdA2a7uJrXjyv aaios7prsGpYASM6y+qd6JsbmvvEY0lwyhLSrB+mduw+JzK/WcORuD1qO4S262pGuN09 AAfvjYlhnItRNYYPmHMkJ/XmpgncXFQLWGjPffEnT9++CU5xUNOYOIt57Wxo6/whBhmG VeeohqsCOAGlptBNpnsxg5MGjwnSZz2v5ljVaLTKnNrYOfDpMJiXXmd/Jkc0hQB0Ou7a neAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r11-20020a170902be0b00b00178a6609824si357874pls.554.2022.09.18.21.05.06; Sun, 18 Sep 2022 21:05:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229633AbiISDsT (ORCPT + 99 others); Sun, 18 Sep 2022 23:48:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229599AbiISDsR (ORCPT ); Sun, 18 Sep 2022 23:48:17 -0400 Received: from SHSQR01.spreadtrum.com (mx1.unisoc.com [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB6D9E021 for ; Sun, 18 Sep 2022 20:48:15 -0700 (PDT) Received: from SHSend.spreadtrum.com (bjmbx01.spreadtrum.com [10.0.64.7]) by SHSQR01.spreadtrum.com with ESMTPS id 28J3ldJv048412 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NO); Mon, 19 Sep 2022 11:47:39 +0800 (CST) (envelope-from zhaoyang.huang@unisoc.com) Received: from bj03382pcu.spreadtrum.com (10.0.74.65) by BJMBX01.spreadtrum.com (10.0.64.7) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Mon, 19 Sep 2022 11:47:38 +0800 From: "zhaoyang.huang" To: Mel Gorman , Andrew Morton , Zhaoyang Huang , , , Subject: [PATCH] mm: check high-order page when free it to pcp Date: Mon, 19 Sep 2022 11:47:18 +0800 Message-ID: <1663559238-22918-1-git-send-email-zhaoyang.huang@unisoc.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.0.74.65] X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To BJMBX01.spreadtrum.com (10.0.64.7) X-MAIL: SHSQR01.spreadtrum.com 28J3ldJv048412 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhaoyang Huang High-order pcp page escaped from checking when both of DEBUG_VM and debug_pagealloc are all disabled if it allocated again from pcp_list without going to global free list, which should be introduced by 44042b4498. fix:44042b4498 Signed-off-by: Zhaoyang Huang --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index e008a3d..e77f3a7 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1437,7 +1437,7 @@ static bool bulkfree_pcp_prepare(struct page *page) */ static bool free_pcp_prepare(struct page *page, unsigned int order) { - if (debug_pagealloc_enabled_static()) + if (debug_pagealloc_enabled_static() || order) return free_pages_prepare(page, order, true, FPI_NONE); else return free_pages_prepare(page, order, false, FPI_NONE); -- 1.9.1