函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\syscall.c Create Date:2022-07-27 14:04:32
Last Modify:2022-05-19 18:06:12 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:bpf_map_mmap

函数原型:static int bpf_map_mmap(struct file *filp, struct vm_area_struct *vma)

返回类型:int

参数:

类型参数名称
struct file *filp
struct vm_area_struct *vma
478  map等于 needed for tty driver, and maybe others
481  如果非map_mmapmap_value_has_spin_lock(map)则返回:负Operation is not supported
484  如果非Flags, see mm.h. 按位与VM_SHARED的值则返回:负EINVAL
487  mutex_lock( & freeze_mutex)
489  如果Flags, see mm.h. 按位与VM_WRITE write-once; write-protected by freeze_mutex
490  err等于负EPERM
491  转到:out
495  Function pointers to deal with this struct. 等于bpf_map_default_vmops
496  was vm_pte (shared mem) 等于map
498  err等于map_mmap(map, vma)
499  如果err则转到:out
502  bpf_map_inc_with_uref(map)
504  如果Flags, see mm.h. 按位与VM_WRITE writable mmap cnt; protected by freeze_mutex 自加
506  out :
507  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
508  返回:err