函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:copy_pmd_range

函数原型:static inline int copy_pmd_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, pud_t *dst_pud, pud_t *src_pud, struct vm_area_struct *vma, unsigned long addr, unsigned long end)

返回类型:int

参数:

类型参数名称
struct mm_struct *dst_mm
struct mm_struct *src_mm
pud_t *dst_pud
pud_t *src_pud
struct vm_area_struct *vma
unsigned longaddr
unsigned longend
872  dst_pmd等于pmd_alloc(dst_mm, dst_pud, addr)
873  如果非dst_pmd则返回:负ENOMEM
875  src_pmd等于pmd_offset(src_pud, addr)
876  循环
877  next等于pmd_addr_end(addr, end)
878  如果is_swap_pmd( * src_pmd)或pmd_trans_huge( * src_pmd)或pmd_devmap( * src_pmd)则
884  如果err恒等于负ENOMEM则返回:负ENOMEM
886  如果非err则继续下一循环
890  如果pmd_none_or_clear_bad(src_pmd)则继续下一循环
892  如果copy_pte_range(dst_mm, src_mm, dst_pmd, src_pmd, vma, addr, next)则返回:负ENOMEM
895 dst_pmd自加, src_pmd自加, addr等于next, addr不等于end循环
896  返回:0
调用者
名称描述
copy_pud_range