函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:map_freeze

函数原型:static int map_freeze(const union bpf_attr *attr)

返回类型:int

参数:

类型参数名称
const union bpf_attr *attr
1247  err等于0, ufd等于 anonymous struct used by BPF_MAP_*_ELEM commands
1251  如果helper macro to check that unused fields 'union bpf_attr' are zero (BPF_MAP_FREEZE)则返回:负EINVAL
1254  f等于fdget(ufd)
1255  map等于 error is returned, fd is released.* On success caller should complete fd access with matching fdput()
1256  如果是错误则返回:错误
1259  mutex_lock( & freeze_mutex)
1261  如果 writable mmap cnt; protected by freeze_mutex
1262  err等于负EBUSY
1263  转到:err_put
1265  如果READ_ONCE( write-once; write-protected by freeze_mutex )则
1266  err等于负EBUSY
1267  转到:err_put
1269  如果非操作权限检查
1270  err等于负EPERM
1271  转到:err_put
1274  WRITE_ONCE( write-once; write-protected by freeze_mutex , true)
1275  err_put :
1276  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.
1277  fdput(f)
1278  返回:err