Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\syscall.c Create Date:2022-07-28 12:54:07
Last Modify:2022-05-19 18:06:12 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bpf_obj_get_next_id

Proto:static int bpf_obj_get_next_id(const union bpf_attr *attr, union bpf_attr __user *uattr, struct idr *idr, spinlock_t *lock)

Type:int

Parameter:

TypeParameterName
const union bpf_attr *attr
union bpf_attr __user *uattr
struct idr *idr
spinlock_t *lock
2285  next_id = start_id
2286  err = 0
2288  If helper macro to check that unused fields 'union bpf_attr' are zero (BPF_OBJ_GET_NEXT_ID) || next_id >= INT_MAX Then Return -EINVAL
2291  If Not Check operation authority Then Return -EPERM
2294  next_id++
2295  spin_lock_bh(lock)
2296  If Not dr_get_next() - Find next populated entry.*@idr: IDR handle.*@nextid: Pointer to an ID.* Returns the next populated entry in the tree with an ID greater than* or equal to the value pointed to by @nextid. On exit, @nextid is updated Then err = -ENOENT
2298  spin_unlock_bh(lock)
2300  If Not err Then err = Write a simple value into user space(next_id, & next_id)
2303  Return err