From patchwork Thu May 21 23:38:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 11564189 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3D50714B7 for ; Thu, 21 May 2020 23:38:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 074B420823 for ; Thu, 21 May 2020 23:38:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="izCdN89A" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 074B420823 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 27E6780008; Thu, 21 May 2020 19:38:46 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 22E8B80007; Thu, 21 May 2020 19:38:46 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0F64A80008; Thu, 21 May 2020 19:38:46 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0043.hostedemail.com [216.40.44.43]) by kanga.kvack.org (Postfix) with ESMTP id E726F80007 for ; Thu, 21 May 2020 19:38:45 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id A1843180AD81F for ; Thu, 21 May 2020 23:38:45 +0000 (UTC) X-FDA: 76842343410.17.tax58_2f5533ab9ed49 X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,jhubbard@nvidia.com,,RULES_HIT:30012:30054:30055:30064,0,RBL:216.228.121.64:@nvidia.com:.lbl8.mailshell.net-62.18.0.100 64.10.201.10,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: tax58_2f5533ab9ed49 X-Filterd-Recvd-Size: 4714 Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Thu, 21 May 2020 23:38:45 +0000 (UTC) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 21 May 2020 16:37:24 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Thu, 21 May 2020 16:38:44 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Thu, 21 May 2020 16:38:44 -0700 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 21 May 2020 23:38:43 +0000 Received: from rnnvemgw01.nvidia.com (10.128.109.123) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Thu, 21 May 2020 23:38:43 +0000 Received: from sandstorm.nvidia.com (Not Verified[10.2.48.182]) by rnnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Thu, 21 May 2020 16:38:43 -0700 From: John Hubbard To: Andrew Morton CC: Souptick Joarder , Matthew Wilcox , Jani Nikula , "Joonas Lahtinen" , Rodrigo Vivi , David Airlie , Daniel Vetter , Chris Wilson , Tvrtko Ursulin , Matthew Auld , , , LKML , , John Hubbard Subject: [PATCH] mm/gup: fixup gup.c for "mm/gup: refactor and de-duplicate gup_fast() code" Date: Thu, 21 May 2020 16:38:41 -0700 Message-ID: <20200521233841.1279742-1-jhubbard@nvidia.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-NVConfidentiality: public DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1590104244; bh=oK3cn3yjsB7kmSIMJxAJI0j+n+7vBZVJ7t2DXnyjgUI=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: MIME-Version:X-NVConfidentiality:Content-Transfer-Encoding: Content-Type; b=izCdN89AWfExilHUwGQewVpC/TR2eV0PG31JIjZgDPHNR7BymtQsj13yg+A1XApO1 Ygum2vlEXMeDgkBjbCncWJsg8iHcSjtXVdwiUhGhkaTGTM/gu+LdUcnevDhwXTwJAU d/FJRU0sldpoVEw2n7Wdu0aVAs224oYw4bvIo0h1mFTXZMxU1Rd9ARWwIXMvdR6m5b 17W3ETWgvQmu4GR+nl3xiJHeV/jEEhdSpBhO/Z+Mq0xT76DGr99gH5WkZEb6C0xA2s brVRbZiat6q0a7vVARoEq+/4dtxXTO5rlj529m9CGd6dXmOVYIlW8xHp7/e3OAtZUW rnXmFsdDGOFAA== 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: Include FOLL_FAST_ONLY in the list of flags to *not* WARN() on, in internal_get_user_pages_fast(). Cc: Chris Wilson Cc: Daniel Vetter Cc: David Airlie Cc: Jani Nikula Cc: "Joonas Lahtinen" Cc: Matthew Auld Cc: Matthew Wilcox Cc: Rodrigo Vivi Cc: Souptick Joarder Cc: Tvrtko Ursulin Signed-off-by: John Hubbard --- Hi Andrew, Chris, Andrew: This is a fixup that applies to today's (20200521) linux-next. In that tree, this fixes up: commit dfb8dfe80808 ("mm/gup: refactor and de-duplicate gup_fast() code") Chris: I'd like to request another CI run for the drm/i915 changes, so for that, would you prefer that I post a v2 of the series [1], or is it easier for you to just apply this patch here, on top of [2]? [1] https://lore.kernel.org/r/20200519002124.2025955-1-jhubbard@nvidia.com [2] https://lore.kernel.org/r/158985123351.31239.10766458886430429630@emeril.freedesktop.org thanks, John Hubbard NVIDIA mm/gup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/gup.c b/mm/gup.c index dd8895f2fafa1..ada6aa79576dc 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -2724,7 +2724,8 @@ static int internal_get_user_pages_fast(unsigned long start, int nr_pages, int nr_pinned = 0, ret = 0; if (WARN_ON_ONCE(gup_flags & ~(FOLL_WRITE | FOLL_LONGTERM | - FOLL_FORCE | FOLL_PIN | FOLL_GET))) + FOLL_FORCE | FOLL_PIN | FOLL_GET | + FOLL_FAST_ONLY))) return -EINVAL; start = untagged_addr(start) & PAGE_MASK;