函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swap.c Create Date:2022-07-27 15:36:48
Last Modify:2022-05-23 13:40:24 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:get_kernel_pages() - pin kernel pages in memory*@kiov: An array of struct kvec structures*@nr_segs: number of segments to pin*@write: pinning for read/write, currently ignored*@pages: array that receives pointers to the pages pinned.

函数原型:int get_kernel_pages(const struct kvec *kiov, int nr_segs, int write, struct page **pages)

返回类型:int

参数:

类型参数名称
const struct kvec *kiov
intnr_segs
intwrite
struct page **pages
156 seg小于nr_segs循环
157  如果WARN_ON(iov_len != PAGE_SIZE)则返回:seg
160  pages[seg]等于kmap_to_page( and that should *never* hold a userland pointer )
161  get_page(pages[seg])
164  返回:seg
调用者
名称描述
get_kernel_pageget_kernel_page() - pin a kernel page in memory*@start: starting kernel address*@write: pinning for read/write, currently ignored*@pages: array that receives pointer to the page pinned.* Must be at least nr_segs long.* Returns 1 if page is pinned