函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\gup.c Create Date:2022-07-27 16:01:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__gup_longterm_locked() is a wrapper for __get_user_pages_locked which* allows us to process the FOLL_LONGTERM flag.

函数原型:static long __gup_longterm_locked(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, unsigned long nr_pages, struct page **pages, struct vm_area_struct **vmas, unsigned int gup_flags)

返回类型:long

参数:

类型参数名称
struct task_struct *tsk
struct mm_struct *mm
unsigned longstart
unsigned longnr_pages
struct page **pages
struct vm_area_struct **vmas
unsigned intgup_flags
1558  vmas_tmp等于vmas
1559  flags等于0
1562  如果gup_flags按位与mapping lifetime is indefinite: see below
1563  如果非pages则返回:负EINVAL
1566  如果非vmas_tmp
1570  如果非vmas_tmp则返回:负ENOMEM
1573  flags等于memalloc_nocma_save()
1576  rc等于__get_user_pages_locked(tsk, mm, start, nr_pages, pages, vmas_tmp, NULL, gup_flags)
1579  如果gup_flags按位与mapping lifetime is indefinite: see below
1580  memalloc_nocma_restore(flags)
1581  如果rc小于0则转到:out
1585 i小于rc循环put_page(pages[i])
1587  rc等于负EOPNOTSUPP
1588  转到:out
1591  rc等于check_and_migrate_cma_pages(tsk, mm, start, rc, pages, vmas_tmp, gup_flags)
1595  out :
1596  如果vmas_tmp不等于vmas释放内存
1598  返回:rc
调用者
名称描述
get_user_pagesThis is the same as get_user_pages_remote(), just with a* less-flexible calling convention where we assume that the task* and mm being operated on are the current task's and don't allow* passing of a locked parameter. We also obviously don't pass
__gup_longterm_unlocked