diff options
author | Miles Chen <miles.chen@mediatek.com> | 2020-06-02 06:48:33 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-06-02 19:59:08 +0200 |
commit | 548b6a1e5520d5647e3d39c0aaf1f83ab27e250f (patch) | |
tree | 99317156f9c26f3b88380b6bae3e599f25717fda /mm/gup.c | |
parent | ivtv: convert get_user_pages() --> pin_user_pages() (diff) | |
download | linux-548b6a1e5520d5647e3d39c0aaf1f83ab27e250f.tar.xz linux-548b6a1e5520d5647e3d39c0aaf1f83ab27e250f.zip |
mm/gup.c: further document vma_permits_fault()
Describe the caller's responsibilities when passing
FAULT_FLAG_ALLOW_RETRY.
Link: http://lkml.kernel.org/r/1586915606.5647.5.camel@mtkswgap22
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/gup.c')
-rw-r--r-- | mm/gup.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1176,7 +1176,8 @@ static bool vma_permits_fault(struct vm_area_struct *vma, * @address: user address * @fault_flags:flags to pass down to handle_mm_fault() * @unlocked: did we unlock the mmap_sem while retrying, maybe NULL if caller - * does not allow retry + * does not allow retry. If NULL, the caller must guarantee + * that fault_flags does not contain FAULT_FLAG_ALLOW_RETRY. * * This is meant to be called in the specific scenario where for locking reasons * we try to access user memory in atomic context (within a pagefault_disable() |