From patchwork Fri Oct 2 17:53:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11814377 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 BA482618 for ; Fri, 2 Oct 2020 17:54:14 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 86EF4206DD for ; Fri, 2 Oct 2020 17:54:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LutZ1MbR"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="GdOd/VH/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 86EF4206DD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=tl0vW9VNbFnTi0Xlr52luHzpqzq+32pPo0MwYERxtDI=; b=LutZ1MbRJDEp928vTbt7mXdi4O L9EFI0BwZGdnQPkt0sNc7M/ErSJvROBh8chAiE7Z88NN6lH7weMU4jyRZvvWhPLNKE0C/LRt+JPWn ZZ7sNORGhRQdpleoLfVxa44OBNP5tQ/CYDO++iWBjARDu0VN6+Vy+Q6WqOCA1vZ7qyebIZmxWJRPb l4s0Hnnqi3E2c37FNs2uXK+yoSDVMVL6Hy4EpoPWowid3De+QKNmhjTQiGL/4G8cHgnt1cU9PfDyA Y0RCLqF5C1Y/r3bR96UiB7mPqdjTI9zRx4SXd9egRVzJS+JIC2Sd85Nmfy8qfaB+7ZO7PomWjlOwH i5VgN/MA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOPFe-00078K-Ep; Fri, 02 Oct 2020 17:53:50 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOPFY-00075v-9Y for linux-arm-kernel@lists.infradead.org; Fri, 02 Oct 2020 17:53:45 +0000 Received: by mail-wm1-x342.google.com with SMTP id j136so2606904wmj.2 for ; Fri, 02 Oct 2020 10:53:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4Ic9kLI7iEmx4fzg6K/MGmVs8Kbr/xz3cK5mQ8gVn9M=; b=GdOd/VH/FT5eF5Gfj5Q1p9o3Vy+IUnorHd0BlnwOL9uxqZXuqaW6hM5SPvXVoCliFo bYTAnUT5U/MmyPZiyzSRP+mItblvHt3dnKeVQamNmGl1Wkstvlwhpe9QI+eMQwsUSnFG vCIrvzCfJM5d8ZpALwF1YBf+lWT2Rg+eoosfY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4Ic9kLI7iEmx4fzg6K/MGmVs8Kbr/xz3cK5mQ8gVn9M=; b=sWUPzcIzUrw2oZSKFsd7MLaDHvLqYg02s7JD2Xlx1TbVK92HCgV4uEVxQRE8dUksYF hxPwxmLcxil1DY4+HuoTiLVEWEEtV7J796rReY+DnHf5FyoIZIAxilkHF2hyDHVXGFxa TJHUYsoA5djNPPyFa78iOLuBdkRQEMvZopr2mpK29x4Kb/JZsUSnPdloKOmQhlAFXZRT p5vvDzsksdXjj8pQdz8l/ARWYhbvCd3LSxmGMpjSsqodNE3cA0lH0pnhQ9qsKWhEt39T 7jCCoUfjyAjxr13olaWgl678+oGcOHSiQy8XPPXzjr80t+jCwIaDEeoiQC+C7U0gdELg 8KGQ== X-Gm-Message-State: AOAM530tScnI2tn5qtMn5fFFdg2msLvaoqWY5tS+dBVuJlGErJ+tyye1 Kx9qbIlpx85IGL31PfJ5CvemcA== X-Google-Smtp-Source: ABdhPJx4N0mByTSrMhoszno9AheTX2LZ7oZ+iqT+Q3TvlZQuWl0+xgzy8x8+JKsZ5hS5NTaTlr3Xeg== X-Received: by 2002:a7b:cf1a:: with SMTP id l26mr4030327wmg.164.1601661221643; Fri, 02 Oct 2020 10:53:41 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id m10sm2585429wmc.9.2020.10.02.10.53.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 10:53:40 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH 1/2] mm/frame-vec: Drop gup_flags from get_vaddr_frames() Date: Fri, 2 Oct 2020 19:53:02 +0200 Message-Id: <20201002175303.390363-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201002_135344_384178_90802453 X-CRM114-Status: GOOD ( 20.93 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:342 listed in] [list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , linux-mm@kvack.org, Daniel Vetter , Marek Szyprowski , linux-samsung-soc@vger.kernel.org, Joonyoung Shim , Krzysztof Kozlowski , Omer Shpigelman , Kukjin Kim , Tomer Tayar , linux-media@vger.kernel.org, Pawel Osciak , Inki Dae , linux-arm-kernel@lists.infradead.org, Oded Gabbay , Pawel Piskorski , Greg Kroah-Hartman , Seung-Woo Kim , LKML , Tomasz Figa , Kyungmin Park , Andrew Morton Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org FOLL_WRITE | FOLL_FORCE is really the only reasonable thing to do for simple dma device that can't guarantee write protection. Which is also what all the callers are using. So just simplify this. Signed-off-by: Daniel Vetter Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Pawel Osciak Cc: Marek Szyprowski Cc: Tomasz Figa Cc: Andrew Morton Cc: Oded Gabbay Cc: Omer Shpigelman Cc: Tomer Tayar Cc: Greg Kroah-Hartman Cc: Pawel Piskorski Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-media@vger.kernel.org Cc: linux-mm@kvack.org Acked-by: Tomasz Figa Acked-by: Oded Gabbay --- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 3 +-- drivers/media/common/videobuf2/videobuf2-memops.c | 3 +-- drivers/misc/habanalabs/common/memory.c | 3 +-- include/linux/mm.h | 2 +- mm/frame_vector.c | 4 ++-- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index 967a5cdc120e..ac452842bab3 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c @@ -480,8 +480,7 @@ static dma_addr_t *g2d_userptr_get_dma_addr(struct g2d_data *g2d, goto err_free; } - ret = get_vaddr_frames(start, npages, FOLL_FORCE | FOLL_WRITE, - g2d_userptr->vec); + ret = get_vaddr_frames(start, npages, g2d_userptr->vec); if (ret != npages) { DRM_DEV_ERROR(g2d->dev, "failed to get user pages from userptr.\n"); diff --git a/drivers/media/common/videobuf2/videobuf2-memops.c b/drivers/media/common/videobuf2/videobuf2-memops.c index 6e9e05153f4e..9dd6c27162f4 100644 --- a/drivers/media/common/videobuf2/videobuf2-memops.c +++ b/drivers/media/common/videobuf2/videobuf2-memops.c @@ -40,7 +40,6 @@ struct frame_vector *vb2_create_framevec(unsigned long start, unsigned long first, last; unsigned long nr; struct frame_vector *vec; - unsigned int flags = FOLL_FORCE | FOLL_WRITE; first = start >> PAGE_SHIFT; last = (start + length - 1) >> PAGE_SHIFT; @@ -48,7 +47,7 @@ struct frame_vector *vb2_create_framevec(unsigned long start, vec = frame_vector_create(nr); if (!vec) return ERR_PTR(-ENOMEM); - ret = get_vaddr_frames(start & PAGE_MASK, nr, flags, vec); + ret = get_vaddr_frames(start & PAGE_MASK, nr, vec); if (ret < 0) goto out_destroy; /* We accept only complete set of PFNs */ diff --git a/drivers/misc/habanalabs/common/memory.c b/drivers/misc/habanalabs/common/memory.c index 5ff4688683fd..43b10aee8150 100644 --- a/drivers/misc/habanalabs/common/memory.c +++ b/drivers/misc/habanalabs/common/memory.c @@ -1287,8 +1287,7 @@ static int get_user_memory(struct hl_device *hdev, u64 addr, u64 size, return -ENOMEM; } - rc = get_vaddr_frames(start, npages, FOLL_FORCE | FOLL_WRITE, - userptr->vec); + rc = get_vaddr_frames(start, npages, userptr->vec); if (rc != npages) { dev_err(hdev->dev, diff --git a/include/linux/mm.h b/include/linux/mm.h index 16b799a0522c..7d14aa2780d2 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1757,7 +1757,7 @@ struct frame_vector { struct frame_vector *frame_vector_create(unsigned int nr_frames); void frame_vector_destroy(struct frame_vector *vec); int get_vaddr_frames(unsigned long start, unsigned int nr_pfns, - unsigned int gup_flags, struct frame_vector *vec); + struct frame_vector *vec); void put_vaddr_frames(struct frame_vector *vec); int frame_vector_to_pages(struct frame_vector *vec); void frame_vector_to_pfns(struct frame_vector *vec); diff --git a/mm/frame_vector.c b/mm/frame_vector.c index 10f82d5643b6..5d34c9047e9c 100644 --- a/mm/frame_vector.c +++ b/mm/frame_vector.c @@ -12,7 +12,6 @@ * get_vaddr_frames() - map virtual addresses to pfns * @start: starting user address * @nr_frames: number of pages / pfns from start to map - * @gup_flags: flags modifying lookup behaviour * @vec: structure which receives pages / pfns of the addresses mapped. * It should have space for at least nr_frames entries. * @@ -32,10 +31,11 @@ * This function takes care of grabbing mmap_lock as necessary. */ int get_vaddr_frames(unsigned long start, unsigned int nr_frames, - unsigned int gup_flags, struct frame_vector *vec) + struct frame_vector *vec) { struct mm_struct *mm = current->mm; struct vm_area_struct *vma; + unsigned int gup_flags = FOLL_WRITE | FOLL_FORCE; int ret = 0; int err; int locked; From patchwork Fri Oct 2 17:53:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11814383 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 E207F618 for ; Fri, 2 Oct 2020 17:55:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A120A206DD for ; Fri, 2 Oct 2020 17:55:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TA8T/EH7"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="FeyUVdPt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A120A206DD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9Hm6dJVXTmQoFkLVlP6EtSpjLWMUcTM7YrAik4c7XJQ=; b=TA8T/EH7K6lxEj6aV/koSOgM2 0Cbc2NfOz2kxTRHTwxxTN4RYHl8qgrmt/LO/ppYe4Ob0RSmoAcNu/vKuqu3FCqjjLYKuDy07CMWag ltLicKSeqzqEuer80RwIobMM0mYgmyS9oVYFXQUqLXmlWaKmBAuEVW0dZFWbiylGbLVDdYiRQKuWJ gbxobmWaow5yHagYoNWqFUITZLpJVsacfIjLthuhw3ytEE2BySWbp2PF/cr6HFXWquOh1q+owP5m9 sM1V8rB3XfopG+lchzFa82kwcUMO2lH/nV6pweroAGS7D9DSIEKHT+mxZ/FqhWLM9A5O74PeSIqRJ /8MprAIiw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOPFb-00077S-LB; Fri, 02 Oct 2020 17:53:47 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOPFY-000760-1l for linux-arm-kernel@lists.infradead.org; Fri, 02 Oct 2020 17:53:45 +0000 Received: by mail-wr1-x443.google.com with SMTP id g4so2721464wrs.5 for ; Fri, 02 Oct 2020 10:53:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mCTncko5YOfdd1hOhILVAexx/vlJaiXxqeCzAQ94in0=; b=FeyUVdPtM4srxB1+dn7I4h3H7Wfi8/fg99I+ABCtisEx3wHtPquZTvZ16RuGWwmZzE vz2bLh2sThVwHVg4NCZu/QZBQT8Z+HfU/9rp+qgb6Lzuk41uNLg5YV0/kZAopqb77csM ge7J8s4JsvsrgpI2ThI5QqsYkQlmjW4Kii0Bw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mCTncko5YOfdd1hOhILVAexx/vlJaiXxqeCzAQ94in0=; b=p23TAeCRu1lYjAcjwqRlWmGDsvhnvakVQPfX44UapdXWI1Kn/Sq+Pp+sADe5+mdDBD t041c5eFjy7I6zBt5w/+qxVOk3VCyMqRq0XUPUc+sjrIFGLgnWPobaZmXLJEGI1Bh+Ge /K3V4CPp5lT9QYtB+dz75LT5plUfhiwyiq+K7pT/O7dqOZfIj0T1yhqaKVbKfvhZiL0M odY4k6ek+uivZl5dpnTn5zF07bmKs7pkSkTxyNYVK/nOv32kOUIr+1Cij6xojlEa1YWN qBeMJZo8DmktCGgx0pZIpLkxBYLJx35fBmAAvjUNVjr6HQcVF31JZ/6U3uRaUayjfnbv fHGA== X-Gm-Message-State: AOAM533qEjkzTjVOewZXHqsRFGKawwCIIM3LlouldtUTgeZv0zN3jKOG cXtfNzfYAMuSV/XfBvPKNuDaJA== X-Google-Smtp-Source: ABdhPJxqlu8ijgg5+4avDVYjjircN8ixFnEQp9RW1tMzahfcEDBuGAuy7tAthp9rZCHLP+C5s3jDnQ== X-Received: by 2002:a5d:4603:: with SMTP id t3mr4212688wrq.424.1601661223009; Fri, 02 Oct 2020 10:53:43 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id m10sm2585429wmc.9.2020.10.02.10.53.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 10:53:42 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH 2/2] mm/frame-vec: use FOLL_LONGTERM Date: Fri, 2 Oct 2020 19:53:03 +0200 Message-Id: <20201002175303.390363-2-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201002175303.390363-1-daniel.vetter@ffwll.ch> References: <20201002175303.390363-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201002_135344_272229_0FB1666C X-CRM114-Status: GOOD ( 21.64 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:443 listed in] [list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, Jan Kara , Daniel Vetter , LKML , linux-mm@kvack.org, =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , John Hubbard , Daniel Vetter , Andrew Morton , Dan Williams , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org For $reasons I've stumbled over this code and I'm not sure the change to the new gup functions in 55a650c35fea ("mm/gup: frame_vector: convert get_user_pages() --> pin_user_pages()") was entirely correct. This here is used for long term buffers (not just quick I/O) like RDMA, and John notes this in his patch. But I thought the rule for these is that they need to add FOLL_LONGTERM, which John's patch didn't do. There is already a dax specific check (added in b7f0554a56f2 ("mm: fail get_vaddr_frames() for filesystem-dax mappings")), so this seems like the prudent thing to do. Signed-off-by: Daniel Vetter Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: Dan Williams Cc: linux-mm@kvack.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-media@vger.kernel.org --- Hi all, I stumbled over this and figured typing this patch can't hurt. Really just to maybe learn a few things about how gup/pup is supposed to be used (we have a bit of that in drivers/gpu), this here isn't really ralated to anything I'm doing. I'm also wondering whether the explicit dax check should be removed, since FOLL_LONGTERM should take care of that already. -Daniel --- mm/frame_vector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/frame_vector.c b/mm/frame_vector.c index 5d34c9047e9c..3507e09cb3ff 100644 --- a/mm/frame_vector.c +++ b/mm/frame_vector.c @@ -35,7 +35,7 @@ int get_vaddr_frames(unsigned long start, unsigned int nr_frames, { struct mm_struct *mm = current->mm; struct vm_area_struct *vma; - unsigned int gup_flags = FOLL_WRITE | FOLL_FORCE; + unsigned int gup_flags = FOLL_WRITE | FOLL_FORCE | FOLL_LONGTERM; int ret = 0; int err; int locked;