Please sign in to comment.
mm: add locked parameter to get_user_pages_remote()
Patch series "mm: unexport __get_user_pages_unlocked()". This patch series continues the cleanup of get_user_pages*() functions taking advantage of the fact we can now pass gup_flags as we please. It firstly adds an additional 'locked' parameter to get_user_pages_remote() to allow for its callers to utilise VM_FAULT_RETRY functionality. This is necessary as the invocation of __get_user_pages_unlocked() in process_vm_rw_single_vec() makes use of this and no other existing higher level function would allow it to do so. Secondly existing callers of __get_user_pages_unlocked() are replaced with the appropriate higher-level replacement - get_user_pages_unlocked() if the current task and memory descriptor are referenced, or get_user_pages_remote() if other task/memory descriptors are referenced (having acquiring mmap_sem.) This patch (of 2): Add a int *locked parameter to get_user_pages_remote() to allow VM_FAULT_RETRY faulting behaviour similar to get_user_pages_[un]locked(). Taking into account the previous adjustments to get_user_pages*() functions allowing for the passing of gup_flags, we are now in a position where __get_user_pages_unlocked() need only be exported for his ability to allow VM_FAULT_RETRY behaviour, this adjustment allows us to subsequently unexport __get_user_pages_unlocked() as well as allowing for future flexibility in the use of get_user_pages_remote(). [email@example.com: merge fix for get_user_pages_remote API change] Link: http://firstname.lastname@example.org Link: http://email@example.com Signed-off-by: Lorenzo Stoakes <firstname.lastname@example.org> Acked-by: Michal Hocko <email@example.com> Cc: Jan Kara <firstname.lastname@example.org> Cc: Hugh Dickins <email@example.com> Cc: Dave Hansen <firstname.lastname@example.org> Cc: Rik van Riel <email@example.com> Cc: Mel Gorman <firstname.lastname@example.org> Cc: Paolo Bonzini <email@example.com> Cc: Radim Krcmar <firstname.lastname@example.org> Signed-off-by: Stephen Rothwell <email@example.com> Signed-off-by: Andrew Morton <firstname.lastname@example.org> Signed-off-by: Linus Torvalds <email@example.com>
- Loading branch information...
Showing with 18 additions and 14 deletions.
- +1 −1 drivers/gpu/drm/etnaviv/etnaviv_gem.c
- +1 −1 drivers/gpu/drm/i915/i915_gem_userptr.c
- +1 −1 drivers/infiniband/core/umem_odp.c
- +1 −1 drivers/vfio/vfio_iommu_type1.c
- +1 −1 fs/exec.c
- +1 −1 include/linux/mm.h
- +2 −2 kernel/events/uprobes.c
- +8 −4 mm/gup.c
- +1 −1 mm/memory.c
- +1 −1 security/tomoyo/domain.c