Re: [PATCH] x86/mm: Fix leak of pmd ptlock

From: Dave Hansen
Date: Tue Jan 05 2021 - 10:41:00 EST


On 12/2/20 10:28 PM, Dan Williams wrote:
> Commit 28ee90fe6048 ("x86/mm: implement free pmd/pte page interfaces")
> introduced a new location where a pmd was released, but neglected to run
> the pmd page destructor. In fact, this happened previously for a
> different pmd release path and was fixed by commit:
>
> c283610e44ec ("x86, mm: do not leak page->ptl for pmd page tables").
>
> This issue was hidden until recently because the failure mode is silent,
> but commit:

Looks sane. Thanks as always for the thorough changelog and the
investigation into why we're suddenly seeing this now.

I agree that ridding ourselves of open-coded free_page()'s is a good
idea, but this patch itself needs to be around for stable anyway. So,

Acked-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>