+ mm-frame-vec-use-foll_longterm.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm/frame-vec: use FOLL_LONGTERM
has been added to the -mm tree.  Its filename is
     mm-frame-vec-use-foll_longterm.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-frame-vec-use-foll_longterm.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-frame-vec-use-foll_longterm.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Daniel Vetter <daniel.vetter@xxxxxxxx>
Subject: mm/frame-vec: use FOLL_LONGTERM

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.

Link: https://lkml.kernel.org/r/20201002175303.390363-2-daniel.vetter@xxxxxxxx
Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>
Cc: John Hubbard <jhubbard@xxxxxxxxxx>
Cc: Jérôme Glisse <jglisse@xxxxxxxxxx>
Cc: Jan Kara <jack@xxxxxxx>
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: Jason Gunthorpe <jgg@xxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Inki Dae <inki.dae@xxxxxxxxxxx>
Cc: Joonyoung Shim <jy0922.shim@xxxxxxxxxxx>
Cc: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Cc: Kukjin Kim <kgene@xxxxxxxxxx>
Cc: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
Cc: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Cc: Oded Gabbay <oded.gabbay@xxxxxxxxx>
Cc: Omer Shpigelman <oshpigelman@xxxxxxxxx>
Cc: Pawel Osciak <pawel@xxxxxxxxxx>
Cc: Pawel Piskorski <ppiskorski@xxxxxxxxx>
Cc: Seung-Woo Kim <sw0312.kim@xxxxxxxxxxx>
Cc: Tomasz Figa <tfiga@xxxxxxxxxxxx>
Cc: Tomer Tayar <ttayar@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/frame_vector.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/frame_vector.c~mm-frame-vec-use-foll_longterm
+++ a/mm/frame_vector.c
@@ -35,7 +35,7 @@ int get_vaddr_frames(unsigned long start
 {
 	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;
_

Patches currently in -mm which might be from daniel.vetter@xxxxxxxx are

mm-frame-vec-drop-gup_flags-from-get_vaddr_frames.patch
mm-frame-vec-use-foll_longterm.patch





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux