Skip to content

mm/get_user_pages_fast fixes, cleanups

Michael S. Tsirkin linux-mips linux-mm linux-s390 linux-sh lkml sparclinux stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest3 patches 5 repliesIn review 2 of 3 applied

Changes in v2 from the cover letter

limit code changes to get_user_pages_fast. document __get_user_pages_fast
fix a bug in caller

Patches in v2 2 of 3 applied

#Subject and filesSizeRepliesApplied
1/3mm/gup_benchmark: handle gup failuresmm/gup_benchmark.c+3 -23 repliesApplied
2/3gup: return -EFAULT on access_ok failuremm/gup.c+4 -10 repliesApplied
3/3mm/gup: document return valuearch/mips/mm/gup.c arch/s390/mm/gup.c arch/sh/mm/gup.c +3 more+17 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] mm/get_user_pages_fast fixes, cleanups

Turns out get_user_pages_fast and __get_user_pages_fast return different values on error when given a single page: __get_user_pages_fast returns
0. get_user_pages_fast returns either 0 or an error.

Callers of get_user_pages_fast expect an error so fix it up to return an error consistently.

Stress the difference between get_user_pages_fast and __get_user_pages_fast to make sure callers aren't confused.

Changes from v1:
limit code changes to get_user_pages_fast. document __get_user_pages_fast
fix a bug in caller

Michael S. Tsirkin (3):
mm/gup_benchmark: handle gup failures
gup: return -EFAULT on access_ok failure
mm/gup: document return value

 arch/mips/mm/gup.c  | 2 ++
 arch/s390/mm/gup.c  | 2 ++
 arch/sh/mm/gup.c    | 2 ++
 arch/sparc/mm/gup.c | 4 ++++
 mm/gup.c            | 9 +++++++--
 mm/gup_benchmark.c  | 5 +++--
 mm/util.c           | 6 ++++--
 7 files changed, 24 insertions(+), 6 deletions(-)
Signature · 1 line
MST