Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp51266pxu; Wed, 2 Dec 2020 14:45:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxRqy7rcqFlEVV1/dAStJOPxLKPmqetPKsyINuxfEhGPZ+w550DIDLPlxJdx5U6NW7/QCe5 X-Received: by 2002:a05:6402:229b:: with SMTP id cw27mr239869edb.23.1606949147910; Wed, 02 Dec 2020 14:45:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606949147; cv=none; d=google.com; s=arc-20160816; b=Py3A37nv5VGd1mdH+QP90MVOIWiCXaKzNyElXgSqS2Ziz2SBbmU/QMMDxwuVfpaWrm pvj0+xYFQzfhPbAmyEFj0pwWDtrnhsxmqkEXjM0SeuA29JzjhpdOULco8SWrcT8oDugy w8LOwOnEdO3m/5ivry7jz9ubkQhf/gh98usxdP54O9HnvoW+AU838gngg64yZZlvNKzi nktll+tDMWJQFOWX9FsYhN3oVYcm4MRINxZTQ1HDVgqCatrzAz+nc3fqx1ZZ5XobwfXF i0H3Ldv76FUvWdXlnybuLHy5FFov7cANRoAsfj5OzNOXeUvb6w7Z63Ef2wkiqipMg80N /4EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=0hFEYOz9SQEO5g/Hxds9W0B7cSaL5INIcyasu2Z9rU0=; b=zFjS3mb8ZNwJ/6c09KLgXYPid4nG4ryRnd4T8AUv90fJS0L0xxBf+CE27yfImzOoKe +8Icm/RSUOAeP48Sk8m3S6Wrd51c6FRj1emT76PS0/QiInA3VjeRs4UGqY1XHEGGk7n3 vadqYdJkaxhHYaHTTyvI/nmJiP5+albgbx0oPvvVzSyTimfgUILqWQ/wAJy+Ku9T9wzA 8q4ZzggZUWuYad7e1Qhs1MHk7YzxhTf8JLZVepxg9I5dxepVGA819hF8/zmjegRw3bKt vhD42bEVEAnv3b3wbLPbJsmZIapabjOgbrysB2aY9McZ8ueXHRtfniB3NnDMdqqA7BHz fbBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="fp+mB/KJ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o11si143505edz.15.2020.12.02.14.45.25; Wed, 02 Dec 2020 14:45:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="fp+mB/KJ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728499AbgLBWmy (ORCPT + 99 others); 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