From patchwork Mon Sep 19 03:47:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "zhaoyang.huang" X-Patchwork-Id: 12979675 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2732ECAAA1 for ; Mon, 19 Sep 2022 03:48:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 07A336B0072; Sun, 18 Sep 2022 23:48:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 029006B0073; Sun, 18 Sep 2022 23:48:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E821E940007; Sun, 18 Sep 2022 23:48:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id D9BEA6B0072 for ; Sun, 18 Sep 2022 23:48:03 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id A94B8AC5D7 for ; Mon, 19 Sep 2022 03:48:03 +0000 (UTC) X-FDA: 79927451646.16.08361C9 Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) by imf02.hostedemail.com (Postfix) with ESMTP id 7C65C80006 for ; Mon, 19 Sep 2022 03:48:02 +0000 (UTC) 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 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663559283; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references; bh=lWf9ai8KEHZ+UIEULA1F8GUYL8n1KBwQJ7QtrWucvx4=; b=7UrtKn8+P+ZlxJW5uX8Zdktw9wnfa+NlY47Vjy+ZA0vaFXEZT2NB3hDoHmN8vnveNYeh8x 837dsH1QoHQ+H6Cw4bFyTBDWVJH3EFKKrBlDGGdDQxtJxehjmMf6wg/rvMzZPHGc2uSkfM P2XNWHRo3bWyaGwq74vcTmPa8tfcONo= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf02.hostedemail.com: domain of zhaoyang.huang@unisoc.com designates 222.66.158.135 as permitted sender) smtp.mailfrom=zhaoyang.huang@unisoc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663559283; a=rsa-sha256; cv=none; b=PfYnhQxlrQwJ76IR8oaHoKvP2cAkwwxD6pQIaIB8we19EkpKe3xuFpMk2m/ji3DT3n0PIF gYKEo7yBFdUZZeyXtCZZuPM0VMrASsX6Fgh49pvom1FH6ftOxu8p2Cf7KirtAW6pFmhlK+ J5y99uXG2bgjwEsP+6HceV0DDD1CQBs= X-Stat-Signature: ccn1jmg5ruimwymko3tt136ia343w1ba X-Rspamd-Queue-Id: 7C65C80006 Authentication-Results: imf02.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf02.hostedemail.com: domain of zhaoyang.huang@unisoc.com designates 222.66.158.135 as permitted sender) smtp.mailfrom=zhaoyang.huang@unisoc.com X-Rspam-User: X-Rspamd-Server: rspam06 X-HE-Tag: 1663559282-376458 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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);