函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:bpf_prog_alloc_id

函数原型:static int bpf_prog_alloc_id(struct bpf_prog *prog)

返回类型:int

参数:

类型参数名称
struct bpf_prog *prog
1358  dr_preload - preload for idr_alloc()*@gfp_mask: allocation mask to use for preloading* Preallocate memory to use for the next call to idr_alloc(). This function* returns with preemption disabled. It will be enabled by idr_preload_end().
1359  spin_lock_bh( & prog_idr_lock)
1360  id等于dr_alloc_cyclic() - Allocate an ID cyclically.*@idr: IDR handle.*@ptr: Pointer to be associated with the new ID.*@start: The minimum ID (inclusive).*@end: The maximum ID (exclusive).*@gfp: Memory allocation flags.
1361  如果id大于0则id等于id
1363  spin_unlock_bh( & prog_idr_lock)
1364  dr_preload_end - end preload section started with idr_preload()* Each idr_preload() should be matched with an invocation of this* function. See idr_preload() for details.
1367  如果WARN_ON_ONCE(!id)则返回:负ENOSPC
1370  返回:如果id大于0则0否则id
调用者
名称描述
bpf_prog_load