Re: [PATCH] mm: migration: deposit page table when copying a PMD migration entry.

From: Kirill A. Shutemov
Date: Mon Oct 30 2017 - 12:09:37 EST


On Mon, Oct 30, 2017 at 10:46:36AM -0400, Zi Yan wrote:
> From: Zi Yan <zi.yan@xxxxxxxxxxxxxx>
>
> We need to deposit pre-allocated PTE page table when a PMD migration
> entry is copied in copy_huge_pmd(). Otherwise, we will leak the
> pre-allocated page and cause a NULL pointer dereference later
> in zap_huge_pmd().
>
> The missing counters during PMD migration entry copy process are added
> as well.
>
> The bug report is here: https://lkml.org/lkml/2017/10/29/214
>
> Fixes: 84c3fc4e9c563 ("mm: thp: check pmd migration entry in common path")
> Reported-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
> Signed-off-by: Zi Yan <zi.yan@xxxxxxxxxxxxxx>
> Cc: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>

Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>

--
Kirill A. Shutemov