Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2008921yba; Tue, 2 Apr 2019 22:31:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUuPSqj2I0bSeik07Jl1Mokps8AFdCmrU/xmybK/5s01r6ZUdB7iInnaFWbRJC3hCLbYkj X-Received: by 2002:a17:902:6b8a:: with SMTP id p10mr75275275plk.109.1554269493415; Tue, 02 Apr 2019 22:31:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554269493; cv=none; d=google.com; s=arc-20160816; b=RPUHgDr/lLhfnu1wmo0L/jcNO2cJDQUYiHWcBpRWrbSvzYUv3qAJlRSJHC9sCg3D/G fH9kqK49btEIEuUrt5RAK2wGN/VxCNYwQn0JOBpP496rIClwPlM5/tku7R/kx3Q1biZO m+OaAdvMUlAlTAXw30EJzpd39yj2W7xVWuD8rjkj24rTqScF7CGwfrGTGBWpwhxrSRq2 +npZX/qZaHLxsqjmWmfKYQ8qeuZGJwdJrqAopGrz23fBb0MiH1XpkNFB8NU8Wv0m7oB6 /4lPMeHBMgxmyNB8tbLmpuWVajLgccDILL0yIAIPYsBBKAeHdxb8mpt6hWY57nYvFHqT WdTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from; bh=dxrzaBVS4A5RevJ0tzdbxl3Ek4GkcOX15/H7JCT7rHw=; b=UrK9Dki5nynpvTVX0xBOysHiPsCYN+nSXInVv5nYICHneeLSMNHGf1UH97OS8Gp06m afQj3W28YHgIc6tq3h+WdjHOG0zBVD7OjZ6JcybtLmNAWvqlaAin3ZMhyqYR5izXDKVP ZUo6HJWa928CbgibDFRiuFVZDQkTqglNBlIXhXxF052AIyb7hs0EaROmkmNcx65WSzNw 4frkJEPyvGtyEaTuJ6wnZ2YjcO4OFb2nAXhbrZS8rAkxfK4qMJXgMgeLlu0Iah3pDc1U tNr/qiEb9Sm5lh6nxKq3Gz7Z8NQFX7Rs6lO/ViJ3R/8UGhiqjq/P8Q4S6Fxhy03B9u6d KWRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q65si12979065pfi.185.2019.04.02.22.31.18; Tue, 02 Apr 2019 22:31:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728748AbfDCFac convert rfc822-to-8bit (ORCPT + 99 others); Wed, 3 Apr 2019 01:30:32 -0400 Received: from tyo162.gate.nec.co.jp ([114.179.232.162]:54458 "EHLO tyo162.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726330AbfDCFab (ORCPT ); Wed, 3 Apr 2019 01:30:31 -0400 Received: from mailgate01.nec.co.jp ([114.179.233.122]) by tyo162.gate.nec.co.jp (8.15.1/8.15.1) with ESMTPS id x335UEEq020015 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 3 Apr 2019 14:30:14 +0900 Received: from mailsv01.nec.co.jp (mailgate-v.nec.co.jp [10.204.236.94]) by mailgate01.nec.co.jp (8.15.1/8.15.1) with ESMTP id x335UEsJ013917; Wed, 3 Apr 2019 14:30:14 +0900 Received: from mail02.kamome.nec.co.jp (mail02.kamome.nec.co.jp [10.25.43.5]) by mailsv01.nec.co.jp (8.15.1/8.15.1) with ESMTP id x335SdMJ023670; Wed, 3 Apr 2019 14:30:14 +0900 Received: from bpxc99gp.gisp.nec.co.jp ([10.38.151.149] [10.38.151.149]) by mail03.kamome.nec.co.jp with ESMTP id BT-MMP-3938585; Wed, 3 Apr 2019 14:29:14 +0900 Received: from BPXM23GP.gisp.nec.co.jp ([10.38.151.215]) by BPXC21GP.gisp.nec.co.jp ([10.38.151.149]) with mapi id 14.03.0319.002; Wed, 3 Apr 2019 14:29:13 +0900 From: Naoya Horiguchi To: Mike Kravetz CC: "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Davidlohr Bueso , Joonsoo Kim , Michal Hocko , "Kirill A . Shutemov" , Andrew Morton Subject: Re: [PATCH v2 0/2] A couple hugetlbfs fixes Thread-Topic: [PATCH v2 0/2] A couple hugetlbfs fixes Thread-Index: AQHU6d4rcfOiD6QCGkOryDRCw26i8w== Date: Wed, 3 Apr 2019 05:29:12 +0000 Message-ID: <20190403052913.GA10888@hori.linux.bs1.fc.nec.co.jp> References: <20190328234704.27083-1-mike.kravetz@oracle.com> In-Reply-To: <20190328234704.27083-1-mike.kravetz@oracle.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.148] Content-Type: text/plain; charset="iso-2022-jp" Content-ID: <77345DB63E7D154B902FE1C4B1357009@gisp.nec.co.jp> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-TM-AS-MML: disable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 28, 2019 at 04:47:02PM -0700, Mike Kravetz wrote: > I stumbled on these two hugetlbfs issues while looking at other things: > - The 'restore reserve' functionality at page free time should not > be adjusting subpool counts. > - A BUG can be triggered (not easily) due to temporarily mapping a > page before doing a COW. > > Both are described in detail in the commit message of the patches. > I would appreciate comments from Davidlohr Bueso as one patch is > directly related to code he added in commit 8382d914ebf7. > > I did not cc stable as the first problem has been around since reserves > were added to hugetlbfs and nobody has noticed. The second is very hard > to hit/reproduce. > > v2 - Update definition and all callers of hugetlb_fault_mutex_hash as > the arguments mm and vma are no longer used or necessary. > > Mike Kravetz (2): > huegtlbfs: on restore reserve error path retain subpool reservation > hugetlb: use same fault hash key for shared and private mappings > > fs/hugetlbfs/inode.c | 7 ++----- > include/linux/hugetlb.h | 4 +--- > mm/hugetlb.c | 43 +++++++++++++++++++++-------------------- > mm/userfaultfd.c | 3 +-- > 4 files changed, 26 insertions(+), 31 deletions(-) Both fixes look fine to me. Reviewed-by: Naoya Horiguchi