函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\userfaultfd.c Create Date:2022-07-29 10:52:32
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:userfaultfd_unmap_prep

函数原型:int userfaultfd_unmap_prep(struct vm_area_struct *vma, unsigned long start, unsigned long end, struct list_head *unmaps)

返回类型:int

参数:

类型参数名称
struct vm_area_struct *vma
unsigned longstart
unsigned longend
struct list_head *unmaps
833 vmaOur start address within vm_mm. 小于end循环
835  ctx等于ctx
837  如果非ctx或非atures requested from the userspace 按位与UFFD_FEATURE_EVENT_UNMAP的值或has_unmap_ctx(ctx, unmaps, start, end)则继续下一循环
841  unmap_ctx等于分配内存并置零
842  如果非unmap_ctx则返回:负ENOMEM
845  serfaultfd_ctx_get - Acquires a reference to the internal userfaultfd* context.*@ctx: [in] Pointer to the userfaultfd context.
846  WRITE_ONCE(memory mappings are changing because of non-cooperative event , true)
847  ctx等于ctx
848  start等于start
849  end等于end
850  添加链表项
853  返回:0
调用者
名称描述
__do_munmapMunmap is split into 2 main parts -- this part which finds* what needs doing, and the areas themselves, which do the* work. This now handles partial unmappings.* Jeremy Fitzhardinge