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=-3.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 0E42EC432C3 for ; Thu, 14 Nov 2019 09:38:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E4A9E20718 for ; Thu, 14 Nov 2019 09:38:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726185AbfKNJis convert rfc822-to-8bit (ORCPT ); Thu, 14 Nov 2019 04:38:48 -0500 Received: from tyo162.gate.nec.co.jp ([114.179.232.162]:43659 "EHLO tyo162.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbfKNJis (ORCPT ); Thu, 14 Nov 2019 04:38:48 -0500 Received: from mailgate02.nec.co.jp ([114.179.233.122]) by tyo162.gate.nec.co.jp (8.15.1/8.15.1) with ESMTPS id xAE9bEUn019805 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Nov 2019 18:37:14 +0900 Received: from mailsv01.nec.co.jp (mailgate-v.nec.co.jp [10.204.236.94]) by mailgate02.nec.co.jp (8.15.1/8.15.1) with ESMTP id xAE9bE43012698; Thu, 14 Nov 2019 18:37:14 +0900 Received: from mail01b.kamome.nec.co.jp (mail01b.kamome.nec.co.jp [10.25.43.2]) by mailsv01.nec.co.jp (8.15.1/8.15.1) with ESMTP id xAE9adqI022383; Thu, 14 Nov 2019 18:37:14 +0900 Received: from bpxc99gp.gisp.nec.co.jp ([10.38.151.147] [10.38.151.147]) by mail03.kamome.nec.co.jp with ESMTP id BT-MMP-760305; Thu, 14 Nov 2019 18:35:42 +0900 Received: from BPXM23GP.gisp.nec.co.jp ([10.38.151.215]) by BPXC19GP.gisp.nec.co.jp ([10.38.151.147]) with mapi id 14.03.0439.000; Thu, 14 Nov 2019 18:35:41 +0900 From: Naoya Horiguchi To: Li Xinhai CC: "linux-mm@kvack.org" , Andrew Morton , Michal Hocko , Vlastimil Babka , Hugh Dickins , linux-man Subject: Re: [PATCH v4 1/2] mm: Check range first in queue_pages_test_walk Thread-Topic: [PATCH v4 1/2] mm: Check range first in queue_pages_test_walk Thread-Index: AQHVljTIAjGNOBp1iE2ekRd3spmr1KeJ2nmA Date: Thu, 14 Nov 2019 09:35:41 +0000 Message-ID: <20191114093541.GB2144@hori.linux.bs1.fc.nec.co.jp> References: <1573218104-11021-1-git-send-email-lixinhai.lxh@gmail.com> <1573218104-11021-2-git-send-email-lixinhai.lxh@gmail.com> In-Reply-To: <1573218104-11021-2-git-send-email-lixinhai.lxh@gmail.com> Accept-Language: en-US, ja-JP Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.34.125.150] Content-Type: text/plain; charset="iso-2022-jp" Content-ID: Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-TM-AS-MML: disable Sender: linux-man-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-man@vger.kernel.org On Fri, Nov 08, 2019 at 09:01:43PM +0800, Li Xinhai wrote: > Checking unmapped hole and updating the previous vma must be handled first, > otherwise the unmapped hole could be calculated from a wrong previous vma. > > Several commits were relevant to this error: > commit 6f4576e3687b > ("mempolicy: apply page table walker on queue_pages_range()"), > This commit was correct, the VM_PFNMAP check was after updateing previous > vma > > commit 48684a65b4e3 > (mm: pagewalk: fix misbehavior of walk_page_range for vma(VM_PFNMAP)), > This commit added VM_PFNMAP check before updateing previous vma. Then, > there were two VM_PFNMAP check did same thing twice. > > commit acda0c334028 > (mm/mempolicy.c: get rid of duplicated check for vma(VM_PFNMAP) in queue_page > s_range()), > This commit tried to fix the duplicated VM_PFNMAP check, but it wrongly > removed the one which was after updateing vma. > > Fixes: acda0c334028 (mm/mempolicy.c: get rid of duplicated check for vma(VM_PFNMAP) in queue_page > s_range()) > Cc: Andrew Morton > Cc: Naoya Horiguchi > Cc: Michal Hocko > Cc: Vlastimil Babka > Cc: Hugh Dickins > Cc: linux-man > Signed-off-by: Li Xinhai Reviewed-by: Naoya Horiguchi