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=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 049AEC0044D for ; Mon, 16 Mar 2020 08:58:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B7C6320663 for ; Mon, 16 Mar 2020 08:58:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B7C6320663 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 64D456B0003; Mon, 16 Mar 2020 04:58:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5FDD46B0005; Mon, 16 Mar 2020 04:58:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 539B26B0007; Mon, 16 Mar 2020 04:58:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0032.hostedemail.com [216.40.44.32]) by kanga.kvack.org (Postfix) with ESMTP id 3A2F46B0003 for ; Mon, 16 Mar 2020 04:58:08 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 03635181AEF2A for ; Mon, 16 Mar 2020 08:58:08 +0000 (UTC) X-FDA: 76600623456.02.badge22_cbe95433a117 X-HE-Tag: badge22_cbe95433a117 X-Filterd-Recvd-Size: 1962 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Mon, 16 Mar 2020 08:58:07 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 3CA4768CEC; Mon, 16 Mar 2020 09:58:03 +0100 (CET) Date: Mon, 16 Mar 2020 09:58:03 +0100 From: Christoph Hellwig To: Jason Gunthorpe Cc: Jerome Glisse , Ralph Campbell , Felix.Kuehling@amd.com, linux-mm@kvack.org, John Hubbard , dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, Christoph Hellwig , Philip Yang , Jason Gunthorpe Subject: Re: [PATCH hmm 1/8] mm/hmm: add missing unmaps of the ptep during hmm_vma_handle_pte() Message-ID: <20200316085803.GA12439@lst.de> References: <20200311183506.3997-1-jgg@ziepe.ca> <20200311183506.3997-2-jgg@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200311183506.3997-2-jgg@ziepe.ca> User-Agent: Mutt/1.5.17 (2007-11-01) 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 Wed, Mar 11, 2020 at 03:34:59PM -0300, Jason Gunthorpe wrote: > From: Jason Gunthorpe > > Many of the direct returns of error skipped doing the pte_unmap(). All non > zero exit paths must unmap the pte. > > The pte_unmap() is split unnaturally like this because some of the error > exit paths trigger a sleep and must release the lock before sleeping. > > Fixes: 992de9a8b751 ("mm/hmm: allow to mirror vma of a file on a DAX backed filesystem") > Fixes: 53f5c3f489ec ("mm/hmm: factor out pte and pmd handling to simplify hmm_vma_walk_pmd()") > Signed-off-by: Jason Gunthorpe Looks good: Reviewed-by: Christoph Hellwig Probably papered over by the fact that hmm doesn't work on architectures where pte_unmap isn't a noop right now..