Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp27918261rwd; Tue, 4 Jul 2023 09:40:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6jLxQxzQuN0Xl24+STY/fNUtXEm33Sy6rZqO1WkF7YI5+/8afY02FjzWaCN3mXlBoQDAjP X-Received: by 2002:a05:6808:a93:b0:3a2:8453:39ca with SMTP id q19-20020a0568080a9300b003a2845339camr15056421oij.14.1688488812852; Tue, 04 Jul 2023 09:40:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688488812; cv=none; d=google.com; s=arc-20160816; b=f0NlJqqCyvS5PFvp7pxamSr9iovLkXqi7VyZMOnZD0ktCXjTUepQb3c6HZ5wOAlOp8 5w4zKqrFQ0/ZUIJsvDLck8x1MNDBHGvWbpZusf9uexQWPzq7K0MNRinMCM1UEjG55ew8 bbG1Gc6wdmv59ESIediBi6Zd6iGi/CsTFR6bziBY+7XQzWv/l1rN6lyAJV89p7Q/58/X JBMUIvu+hCIjUTrtGMlQXu7cUs328zH23WeKkHFDcP0iARPdWAwiQlWOubZwAiTCcd73 laxHOLwdauu0L//N6IYRaDf28Sc0z5LQ6zR2L+aAPmuVHggUF6EppLEoxis1S8Z7i3Mh /b0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=kJv2YUx3JEPTO/EzC9PMASgZhgRNeU/Z5BNfMnNqsAc=; fh=Gvar+5YD0c9blrJBImIwSK0eO3vdefJ/7QHa4BHguOA=; b=hUZLJ1BI1gfVyAl1tLsQCVaAtf4B1z1PHsJ8sXbXsKgD8xkVvFkhnjqJY6IqUMTivt PGTfLeUcnqOHO1w6EFi0LuFW/cnbwgpdUT7XAcFP8Jo/JMHC5pjtXHf9NsEcXHalByUY +01O+24ciIJz5VrEmbRIxyLBHaErAjAkl8juDtrg2xHv/HnpL9bIAfTkwU2yD9N3x/06 IgWcyarXJU3KSkFatpyK2SovUpOeej5MxBP/74aH/NHBAg/CP5VFcXxCgqWiAyCqf2cj qa43TkY/4lHtQZCpKUlz8HxPeKi4WhxNwTqo0ikZx5BIqN8mKYHcMhVKfS9TyUfeLuCk 5D6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=0XQ4oeyj; 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 x13-20020a17090aca0d00b00262c7b59f4esi20506398pjt.188.2023.07.04.09.39.55; Tue, 04 Jul 2023 09:40:12 -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=@linux-foundation.org header.s=korg header.b=0XQ4oeyj; 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 S231237AbjGDQ2p (ORCPT + 99 others); Tue, 4 Jul 2023 12:28:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230318AbjGDQ2o (ORCPT ); Tue, 4 Jul 2023 12:28:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A2E5E7A for ; Tue, 4 Jul 2023 09:28:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DB45C612F5 for ; Tue, 4 Jul 2023 16:28:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B52AC433C9; Tue, 4 Jul 2023 16:28:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1688488122; bh=Gy8FgsQVK/jYScLhhq0egPzRmFR+KS5pw20GUgHA3bY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=0XQ4oeyjCyautIiwSTe5EC/yMfZSt2h+C+Sbss8KdTUnR/ha0TRvc3hZybNOYhepx vlUOIBve68EImeRtRCQsKw8nZkpRVZ4e5L4p7t/A99AezxQBWgGawT36jTypLPp6R6 RJupaePm4n27hfh3rK+poyA7//My622wkShIs5JI= Date: Tue, 4 Jul 2023 09:28:41 -0700 From: Andrew Morton To: Liu Shixin Cc: Muchun Song , Matthew Wilcox , Mike Kravetz , Oscar Salvador , , Subject: Re: [PATCH] bootmem: remove the vmemmap pages from kmemleak in free_bootmem_page Message-Id: <20230704092841.2e71a21ee1149ec662c73744@linux-foundation.org> In-Reply-To: <20230704101942.2819426-1-liushixin2@huawei.com> References: <20230704101942.2819426-1-liushixin2@huawei.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Tue, 4 Jul 2023 18:19:42 +0800 Liu Shixin wrote: > commit dd0ff4d12dd2 ("bootmem: remove the vmemmap pages from kmemleak in > put_page_bootmem") fix an overlaps existing problem of kmemleak. But the > problem still existed when HAVE_BOOTMEM_INFO_NODE is disabled, because in > this case, free_bootmem_page() will call free_reserved_page() directly. So I take it that with CONFIG_HAVE_BOOTMEM_INFO_NODE=n, the issue described in dd0ff4d12dd2 still occurs? That kmemleak reports an error and stops working? So we want a cc:stable on this fix, yes? > Fix the problem by adding kmemleak_free_part() in free_bootmem_page() > when HAVE_BOOTMEM_INFO_NODE is disabled. > > Fixes: f41f2ed43ca5 ("mm: hugetlb: free the vmemmap pages associated with each HugeTLB page") > ...