From patchwork Sun May 31 22:48:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 11581011 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 49047913 for ; Sun, 31 May 2020 22:48:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1024A20707 for ; Sun, 31 May 2020 22:48:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="orGjsQX7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1024A20707 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 4344280007; Sun, 31 May 2020 18:48:32 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 3E4948E0003; Sun, 31 May 2020 18:48:32 -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 2F99C80007; Sun, 31 May 2020 18:48:32 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0130.hostedemail.com [216.40.44.130]) by kanga.kvack.org (Postfix) with ESMTP id 164B18E0003 for ; Sun, 31 May 2020 18:48:32 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id CE8A2180AD806 for ; Sun, 31 May 2020 22:48:31 +0000 (UTC) X-FDA: 76878504822.11.game22_2d4c556e6115d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id ADC6E180F8B80 for ; Sun, 31 May 2020 22:48:31 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,jhubbard@nvidia.com,,RULES_HIT:30054:30056:30064:30070,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:23,LUA_SUMMARY:none X-HE-Tag: game22_2d4c556e6115d X-Filterd-Recvd-Size: 3923 Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Sun, 31 May 2020 22:48:31 +0000 (UTC) Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sun, 31 May 2020 15:47:04 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Sun, 31 May 2020 15:48:29 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Sun, 31 May 2020 15:48:29 -0700 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 31 May 2020 22:48:29 +0000 Received: from rnnvemgw01.nvidia.com (10.128.109.123) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sun, 31 May 2020 22:48:29 +0000 Received: from sandstorm.nvidia.com (Not Verified[10.2.56.10]) by rnnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Sun, 31 May 2020 15:48:28 -0700 From: John Hubbard To: Andrew Morton CC: Andy Walls , Mauro Carvalho Chehab , Souptick Joarder , , LKML , , John Hubbard Subject: [PATCH v2 0/2] mm/gup, media/ivtv: introduce pin_user_pages_unlocked Date: Sun, 31 May 2020 15:48:25 -0700 Message-ID: <20200531224827.769427-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=1590965224; bh=aOt8sW2DbTQ7aWHqj2at43KUN0KLfkheGWFM9aoSfBc=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: MIME-Version:X-NVConfidentiality:Content-Transfer-Encoding: Content-Type; b=orGjsQX7/GZyhlyjMwLf6Gd8VmiPPfC+bmYyMyV+FSkk4dVzKy+xRoyEt1OSADwaw PFmiV/6Mcm94xUmcAFZgD/UlzH6KxvvtNeLA3CW8XwHodmh+CSAo9V0juitULojMXk syQe5LWa2ICiie+HOEQY5dwPEwDG3MAIRfAW4POeFqeDT6AdNbCiTZfCaYv57CsjJl 6mMHbnOCJVKHjFIY+nlKYDOYTfmRshDZ9nzGhGTMFbYrlrYzr0YFPSkDWn2tZN3Fu0 ADmc+VAtW4CIisdR3lfvJ0UdS/bgk3vKecEyMWaBW1cs9atrR5ZryEKatflzXDfhk/ Eca4Z28vDG1+Q== X-Rspamd-Queue-Id: ADC6E180F8B80 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000158, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi, Here is a v2 that includes a small change that follows from Souptick's review of another very similar patchset (that added pin_user_pages_locked()) [1]. This applies on top of today's linux.git (5.7-rc7+). Changes since v1: added an assert-and-return to the corresponding get_user_pages_unlocked() call, to keep out any externally set FOLL_PIN flag. These patches are getting merged via Andrew's linux-mm tree, due to adding a new pin_user_pages*() variant to gup.c. However, it would be nice if anyone from IVTV or linux-media could provide some run time testing, maybe even a Tested-by. I've run this patchset through non-destructive xfstests, and a few other things such as LTP. However, I'm not set up for IVTV specific testing. [1] https://lore.kernel.org/r/d11d52f8-d54c-bb45-bde9-198235a03921@nvidia.com John Hubbard (2): mm/gup: introduce pin_user_pages_unlocked ivtv: convert get_user_pages() --> pin_user_pages() drivers/media/pci/ivtv/ivtv-udma.c | 19 ++++++------------- drivers/media/pci/ivtv/ivtv-yuv.c | 17 ++++++----------- drivers/media/pci/ivtv/ivtvfb.c | 4 ++-- include/linux/mm.h | 2 ++ mm/gup.c | 23 +++++++++++++++++++++++ 5 files changed, 39 insertions(+), 26 deletions(-) base-commit: bdc48fa11e46f867ea4d75fa59ee87a7f48be144