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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 0B335C4708F for ; Tue, 1 Jun 2021 21:33:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9A613613B9 for ; Tue, 1 Jun 2021 21:33:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A613613B9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 25EF26B0073; Tue, 1 Jun 2021 17:33:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 235DF6B0074; Tue, 1 Jun 2021 17:33:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0FE056B0075; Tue, 1 Jun 2021 17:33:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0033.hostedemail.com [216.40.44.33]) by kanga.kvack.org (Postfix) with ESMTP id D31396B0073 for ; Tue, 1 Jun 2021 17:33:33 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 6A1668249980 for ; Tue, 1 Jun 2021 21:33:33 +0000 (UTC) X-FDA: 78206456706.15.87EF970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf17.hostedemail.com (Postfix) with ESMTP id 39E944202A1E for ; Tue, 1 Jun 2021 21:33:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=VtQlTRq3lnMUDQP6n+cCL3Pr5EYfmGRzRcuenjvwhbg=; b=jSvFOe6oQvEot8Hy2t2tjZ0oly +rAFW4iWTtIqeDktq4WT7ML2dlJCIplA38nSg/xAGJY75rlRjDfLqPbXQrdXnrp0L4LnkpenIQItQ cRDow56xi46pK/14vztTUe4E1B4LcEngFPWGqOXgFUL6kNx1eaC7OyXbF3Lxg0JD0cbXsB2SRlS+k FOFkai8VEjxQjw7PCuFVE+7Ph6a/TpMfz0V/18nzZ7I4qphlSN5LAddPVzvsB4J5v9pJ6xkLJPw2U yys9VKEnH6YavCFZ4wJOD7v69DJ8bRArY2dFpZl0bhAgQqsxtkvo5fOa1mEWf5/3rcYyuuOiVmt3s JQk0VzXg==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1loC0F-00ASGe-N8; Tue, 01 Jun 2021 21:32:50 +0000 Date: Tue, 1 Jun 2021 22:32:47 +0100 From: Matthew Wilcox To: Hugh Dickins Cc: Andrew Morton , "Kirill A. Shutemov" , Yang Shi , Wang Yugui , Naoya Horiguchi , Alistair Popple , Ralph Campbell , Zi Yan , Miaohe Lin , Minchan Kim , Jue Wang , Peter Xu , Jan Kara , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/7] mm/thp: fix page_address_in_vma() on file THP tails Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 39E944202A1E Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=jSvFOe6o; spf=none (imf17.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam04 X-Stat-Signature: 7hkc1j45w1g35phe5m3tksk1frrswmec X-HE-Tag: 1622583204-665920 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jun 01, 2021 at 02:11:22PM -0700, Hugh Dickins wrote: > From: Jue Wang > > Anon THP tails were already supported, but memory-failure may need to use > page_address_in_vma() on file THP tails, which its page->mapping check did > not permit: fix it. > > hughd adds: no current usage is known to hit the issue, but this does fix > a subtle trap in a general helper: best fixed in stable sooner than later. > > Fixes: 800d8c63b2e9 ("shmem: add huge pages support") > Signed-off-by: Jue Wang > Signed-off-by: Hugh Dickins > Cc: Reviewed-by: Matthew Wilcox (Oracle)