From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20F74C6369E for ; Wed, 2 Dec 2020 22:43:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B18DD221F7 for ; Wed, 2 Dec 2020 22:43:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728890AbgLBWmy (ORCPT ); Wed, 2 Dec 2020 17:42:54 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:41152 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726802AbgLBWmy (ORCPT ); Wed, 2 Dec 2020 17:42:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606948888; h=from:from: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=0hFEYOz9SQEO5g/Hxds9W0B7cSaL5INIcyasu2Z9rU0=; b=fp+mB/KJPz1fYUiWHiCwYhRRgWMe+cUWpNlT42Z6i7dt9lfYSypEJQKbNaNpUWtB52bFu0 /CfAmo80ghjO6542bvBEFAbLq4AJN410mqPOaxogVRTSQv601gNZF+OaMcIRVWJb39G92E bSyc7TDKuXSq2F6+a7FZAnGidmuNX2I= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-466-ccHfYQ8gOzWm5WGlXMYClA-1; Wed, 02 Dec 2020 17:38:05 -0500 X-MC-Unique: ccHfYQ8gOzWm5WGlXMYClA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C6C1339388; Wed, 2 Dec 2020 22:38:03 +0000 (UTC) Received: from localhost.localdomain (ovpn-12-67.pek2.redhat.com [10.72.12.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 30E2E19C44; Wed, 2 Dec 2020 22:37:59 +0000 (UTC) Subject: Re: mapcount corruption regression To: Dan Williams , Matthew Wilcox Cc: "Shutemov, Kirill" , Linux Kernel Mailing List , Linux MM , linux-nvdimm , Vlastimil Babka , Toshi Kani References: <20201201022412.GG4327@casper.infradead.org> <20201201204900.GC11935@casper.infradead.org> <20201202034308.GD11935@casper.infradead.org> From: Yi Zhang Message-ID: <709287b1-dedf-3bff-e46a-8aa19ad774fb@redhat.com> Date: Thu, 3 Dec 2020 06:37:57 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dan > diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c > index dfd82f51ba66..7ed99314dcdf 100644 > --- a/arch/x86/mm/pgtable.c > +++ b/arch/x86/mm/pgtable.c > @@ -829,6 +829,7 @@ int pud_free_pmd_page(pud_t *pud, unsigned long addr) > } > > free_page((unsigned long)pmd_sv); > + pgtable_pmd_page_dtor(virt_to_page(pmd)); > free_page((unsigned long)pmd); > > return 1; > > In 2013 Kirill noticed that he missed a pmd page table free site: > > c283610e44ec x86, mm: do not leak page->ptl for pmd page tables > > In 2018 Toshi added a new pmd page table free site without the destructor: > > 28ee90fe6048 x86/mm: implement free pmd/pte page interfaces > > In 2020 Willy adds PG_table accounting that flags the missing > pgtable_pmd_page_dtor() > > Yi, I would appreciate a confirmation that the fix works for you. > I applied the patch to v5.10-rc3 ~ v5.10-rc6, and cannot reproduce this issue with my regression test now, feel free to add: Tested-by: Yi Zhang Thanks Yi