From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752726AbdJ3QJf (ORCPT ); Mon, 30 Oct 2017 12:09:35 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:51575 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751475AbdJ3QJd (ORCPT ); Mon, 30 Oct 2017 12:09:33 -0400 X-Google-Smtp-Source: ABhQp+RD3V42icpBFMCuUSU1lVFCEO0jFNVv93A2b15OtHxNXkKnbTarhTTTf+6QpHlxFjRz7BT/5A== Date: Mon, 30 Oct 2017 19:09:30 +0300 From: "Kirill A. Shutemov" To: Zi Yan Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A . Shutemov" , Zi Yan , Fengguang Wu Subject: Re: [PATCH] mm: migration: deposit page table when copying a PMD migration entry. Message-ID: <20171030160930.bxisbzpw5pjznelj@node.shutemov.name> References: <20171030144636.4836-1-zi.yan@sent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171030144636.4836-1-zi.yan@sent.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 30, 2017 at 10:46:36AM -0400, Zi Yan wrote: > From: Zi Yan > > 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 > Signed-off-by: Zi Yan > Cc: Kirill A. Shutemov Acked-by: Kirill A. Shutemov -- Kirill A. Shutemov