Message ID | 20220916072257.9639-7-linmiaohe@huawei.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 509E8ECAAD8 for <linux-mm@archiver.kernel.org>; Fri, 16 Sep 2022 07:23:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 743EE80009; Fri, 16 Sep 2022 03:23:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5874F8000E; Fri, 16 Sep 2022 03:23:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3273D8000D; Fri, 16 Sep 2022 03:23:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 13D6F8000B for <linux-mm@kvack.org>; Fri, 16 Sep 2022 03:23:47 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id CE9E314083D for <linux-mm@kvack.org>; Fri, 16 Sep 2022 07:23:46 +0000 (UTC) X-FDA: 79917108852.02.8AAF678 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf26.hostedemail.com (Postfix) with ESMTP id 540281400D0 for <linux-mm@kvack.org>; Fri, 16 Sep 2022 07:23:46 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MTQRT18CRzMmx1; Fri, 16 Sep 2022 15:19:01 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 16 Sep 2022 15:23:38 +0800 From: Miaohe Lin <linmiaohe@huawei.com> To: <akpm@linux-foundation.org>, <david@redhat.com>, <osalvador@suse.de>, <anshuman.khandual@arm.com> CC: <willy@infradead.org>, <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>, <linmiaohe@huawei.com> Subject: [PATCH v2 06/16] mm/page_alloc: fix freeing static percpu memory Date: Fri, 16 Sep 2022 15:22:47 +0800 Message-ID: <20220916072257.9639-7-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220916072257.9639-1-linmiaohe@huawei.com> References: <20220916072257.9639-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663313026; a=rsa-sha256; cv=none; b=eYm2Xdnmx5HdV0hF8JDVmG7DRz009aCoRWmfH9oYmCP+/CnzudU//yqYvqTvkAEgOQinyu wlLC8x/btX9Rn4jpOw9eRY0MNGEaRl8YsLbunasTFAuyjt/f/kA1uPd9UmGo7k3z4SMyOC c6mf4lPrbEcBlHwVo8pU43JGojsgu9E= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf26.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663313026; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9PT+NFWr6n4hbOQN1nIg0F2Tcs95ZMNXMHfuFj4JHrM=; b=aOBgyEjjh6Rtur/UNR64K4azat8yoyYTK2ngrBniZ77PVDNPeW0/NIkr7WNWXXRs6nVXry m4rMmNGzp5NMEmARB/lbn3L07Qz/ISmW/SY3u0V46I83gqyzwyJKwKJzaEdv3x6C0chk87 adBBSe2wIlBziSGQjsjIe0PrKVaqc5c= X-Stat-Signature: g1kjbjye359qn7jb47htif5p3x5zrhy7 X-Rspamd-Queue-Id: 540281400D0 Authentication-Results: imf26.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf26.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Rspamd-Server: rspam01 X-Rspam-User: X-HE-Tag: 1663313026-203864 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: <linux-mm.kvack.org> |
Series |
A few cleanup patches for mm
|
expand
|
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 27ef763bb59f..cad235770948 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -9505,9 +9505,11 @@ void zone_pcp_reset(struct zone *zone) drain_zonestat(zone, pzstats); } free_percpu(zone->per_cpu_pageset); - free_percpu(zone->per_cpu_zonestats); zone->per_cpu_pageset = &boot_pageset; - zone->per_cpu_zonestats = &boot_zonestats; + if (zone->per_cpu_zonestats != &boot_zonestats) { + free_percpu(zone->per_cpu_zonestats); + zone->per_cpu_zonestats = &boot_zonestats; + } } }