Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\inode.c Create Date:2022-07-28 13:06:46
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__get_prog_inode

Proto:static struct bpf_prog *__get_prog_inode(struct inode *inode, enum bpf_prog_type type)

Type:struct bpf_prog

Parameter:

TypeParameterName
struct inode *inode
enum bpf_prog_typetype
518  ret = inode_permission(inode, MAY_READ)
519  If ret Then Return ERR_PTR(ret)
522  If i_op == bpf_map_iops Then Return ERR_PTR( - EINVAL)
524  If i_op != bpf_prog_iops Then Return ERR_PTR( - EACCES)
527  prog = s or device private pointer
529  ret = security_bpf_prog(prog)
530  If ret < 0 Then Return ERR_PTR(ret)
533  If Not bpf_prog_get_ok(prog, & type, false) Then Return ERR_PTR( - EINVAL)
536  bpf_prog_inc(prog)
537  Return prog
Caller
NameDescribe
bpf_prog_get_type_path