Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp332442rwn; Wed, 14 Sep 2022 22:11:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR6ZraF7mRSFa/s6HTdOnzoSfmJsAod7WgYaJfrf1uwxA1+89C3tORHgYilAiAGqXnZN742n X-Received: by 2002:a05:6402:3509:b0:452:20c7:5a95 with SMTP id b9-20020a056402350900b0045220c75a95mr12701861edd.427.1663218686165; Wed, 14 Sep 2022 22:11:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663218686; cv=none; d=google.com; s=arc-20160816; b=i/4aGtVpQaYQZtFs+eUbp5kGih1MHy+S/7jfGbj0/P5yAzz4OyCX9T/gdvETj3YeWM HvOaqRKzrOXkHBh4vPBSIWeO5UERIf9GPvTcirVLFcO2JavIhXimY5htq1c0Sw0gjm60 CxNyf5IsABaeHSPr+TfdMoeEgKy53gUjwyLKnyTDRgyK/sNfpaJoppPrKSM2Jt1bnsPD AlVSCYcXv+ZOLi+o5Y+yojdzJAwJz7M/htPnnNObVGZV37gXue+ynsB7ZZNaL0NcWtJn hP6N290s5S+Vcb4I+/0uDNqwlCpzyZkJAEsh0mgD3TkzM0RN0H1AVhnuMAS1VRWXuZt4 /isA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=yp5m+Hr4qr576DrNyvsj++WSaXFTSF+h11ngNHuL2BQ=; b=v/DZrWvaT6p48b1rNymETbe61B42kBkX3FuUppLozj/H1RJCMNOc860uIMBsSwvLOZ kcq35Uzl3siH0r84ink/qMjMQJmxlt1jnjwLaLKQSNxroyIF7yhcMdcaI8ok81Aozwss d2rZfud/xwtHWUQc4CcHcBCm4q/S8PlVJfY/7sR5OOo9fpd2M89MCo9nYhJ1+R20zPHI qAEwWhZF/1fkJeor37A8JqfGqojX2Bwg1cd6Xrv0yOK3oDiPf24ooWdwiy/kPkrXMlsl iWNvkMy9ozVaf7WwGHdme0swNBh50AGIdFRU3PgNOsaFsdh9B6toaQdN3oH2zDNy1D5v UXuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=U9tQsEyk; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r1-20020a1709061ba100b0076fbaba1addsi1469759ejg.896.2022.09.14.22.10.58; Wed, 14 Sep 2022 22:11:26 -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; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=U9tQsEyk; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229588AbiIOExU (ORCPT + 99 others); Thu, 15 Sep 2022 00:53:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbiIOExT (ORCPT ); Thu, 15 Sep 2022 00:53:19 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 890CC92F66 for ; Wed, 14 Sep 2022 21:53:18 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 49B1C1FA8D; Thu, 15 Sep 2022 04:53:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1663217597; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yp5m+Hr4qr576DrNyvsj++WSaXFTSF+h11ngNHuL2BQ=; b=U9tQsEykO643mz8CIF4D/QKjHaYSxvUbY7HdEx2WcICL35fHPsC7EAXDYeqK4xLbSGB1yE kAeSIUby5ut42I2vD3cCaihSrFQQj8mom0gIug9q3Avvyvu33dbSp9fyBJkYBaDn+VPLAw uge1cXgJrJpnSpJfT4qTTVDAZsULxE0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1663217597; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yp5m+Hr4qr576DrNyvsj++WSaXFTSF+h11ngNHuL2BQ=; b=4dgn8pcX5wftxBjmHtDN0caGySjEY6HnCta3HnPGzfxRParnxyd+WK0s0NiHAhmTy/2FHv tafEOTCmjkmi27Dg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E720E139B3; Thu, 15 Sep 2022 04:53:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id dlKwNbyvImN5LQAAMHmgww (envelope-from ); Thu, 15 Sep 2022 04:53:16 +0000 Date: Thu, 15 Sep 2022 06:53:15 +0200 From: Oscar Salvador To: Miaohe Lin Cc: akpm@linux-foundation.org, david@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 06/16] mm/page_alloc: fix freeing static percpu memory Message-ID: References: <20220909092451.24883-1-linmiaohe@huawei.com> <20220909092451.24883-7-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220909092451.24883-7-linmiaohe@huawei.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Fri, Sep 09, 2022 at 05:24:41PM +0800, Miaohe Lin wrote: > The size of struct per_cpu_zonestat can be 0 on !SMP && !NUMA. In that > case, zone->per_cpu_zonestats will always equal to boot_zonestats. But > in zone_pcp_reset(), zone->per_cpu_zonestats is freed via free_percpu() > directly without checking against boot_zonestats first. boot_zonestats > will be released by free_percpu() unexpectedly. > > Fixes: 28f836b6777b ("mm/page_alloc: split per cpu page lists and zone stats") > Signed-off-by: Miaohe Lin Reviewed-by: Oscar Salvador -- Oscar Salvador SUSE Labs