Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1881101ybk; Thu, 21 May 2020 18:20:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoDmL211fJ5W1tvVeYbSi+uWoTbxaDDVtDmOLoAkI1UCIhetgVXkPxdJ/8f+f8SWsAr6s1 X-Received: by 2002:a17:906:3509:: with SMTP id r9mr5836716eja.382.1590110457325; Thu, 21 May 2020 18:20:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590110457; cv=none; d=google.com; s=arc-20160816; b=UpHwfPZXNGa9h5ggj6N0C0ATo0NGJcswLeCea1JVcJIGz4z5xQbAErkLq3a169fARF UyoDrsifJgcQR/7nGgVi19ICGx0xuaHz0b/VKCbdi0wsBTndc8qPtr7gEdXKaOIwAcW0 OxPuupHcDH4XZadrliSYuBe83poV1AcEWSej2xXkL5RHPLlss6a6oo/jBO8EmCmeEN2H K6wBesWnn9/AZs9MvzZj8uVSNM+YFHQZ5/4ql7SNeL/KEGNtqdboIf8aDMqodt+505zc UW/0AArt/Enhk7mprxbVKofr2t66f8NwlkxAz2R+LenAYIfnaERHi6rtLSp+7AnwHTyI dfeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=f2s5odHQw6uTCgXrfk2HuZPh6AawOvx7KQxg5Yxb65k=; b=GfnX1AKbjlLltQ/1pBVPvcJzU8Tw9Tl4BJ+Vl8eADY9QxOvHwIG87Em1/L2koipjID Xk0al4Jc/JTDLzVjsl+IfKNIqWKPsB1M4kLD0ztHHFql/bK8uYyLFnS2bSijYElOJKLv fLbW6TDKELMl4NLMmrsXByRhZrq6v7gLzU5wbO8DBjfKCT/uDAd+O4Tm09HhCdadZU8+ V3gEwZEWS4zr9vxez1/joK4Ea3hY5sEyqAtFtcx5PV4FZkSNrKVNhyh+R+6pqtlLtKmF z3sbpR/Q/sx5uPyxT0aAq7jmgWN5pxRxc4uM8SIPl9d4bpfOoSf6kSqLxNoWggyMpzMU UQtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="S/5/rz0f"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pk2si1597908ejb.363.2020.05.21.18.20.34; Thu, 21 May 2020 18:20:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="S/5/rz0f"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726979AbgEVBQQ (ORCPT + 99 others); Thu, 21 May 2020 21:16:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726335AbgEVBQP (ORCPT ); Thu, 21 May 2020 21:16:15 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6B7CC061A0E for ; Thu, 21 May 2020 18:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=f2s5odHQw6uTCgXrfk2HuZPh6AawOvx7KQxg5Yxb65k=; b=S/5/rz0f0ZckO8sFQWboHKGGi3 4WGvUJaz0VDiZOXrWm8+1F8HFrVm6ckWfZgBy8svxUY/BH51uCq1WCf3nC1s0aBf/QDComjwU9OTn esDpdCqoedW8NM9apLE4Ljf6o//aqBuABcDV86QW0QbUQSTPdgW8rPiUhxsoqaezppD46CYfzrUG7 gAqRVmnv+MITPXcAtFeFsb2TyGn1q/XVsCYfPlI2SsyxycbgftXfUkxsIHmhbyhlnIL2qyaVY+dDq mi9ylHygZNM3GNVsmGwYp0J6Z/ahwMgMY96M+lP7m2z8Vhod6E+x9o7g+m30QsrwlIzezu/6l4FHA KZAwh9tw==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jbwI4-0006PT-GU; Fri, 22 May 2020 01:16:00 +0000 Date: Thu, 21 May 2020 18:16:00 -0700 From: Matthew Wilcox To: John Hubbard Cc: Andrew Morton , jgg@ziepe.ca, Liam.Howlett@oracle.com, daniel.m.jordan@oracle.com, dave@stgolabs.net, hughd@google.com, jglisse@redhat.com, ldufour@linux.ibm.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, peterz@infradead.org, rientjes@google.com, vbabka@suse.cz, walken@google.com, yinghan@google.com Subject: Re: [PATCH] mm/gup: might_lock_read(mmap_sem) in get_user_pages_fast() Message-ID: <20200522011600.GJ28818@bombadil.infradead.org> References: <20200522010443.1290485-1-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200522010443.1290485-1-jhubbard@nvidia.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 21, 2020 at 06:04:43PM -0700, John Hubbard wrote: > Instead of scattering these assertions across the drivers, > do this assertion inside the core of get_user_pages_fast*() > functions. That also includes pin_user_pages_fast*() > routines. > > Add a might_lock_read(mmap_sem) call to internal_get_user_pages_fast(). > > Suggested-by: Matthew Wilcox Yup, this is exactly what I meant. Feel free to transform this into an Acked-by: or Reviewed-by: if that's the appropriate tag. Thanks, John!