函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\trampoline.c Create Date:2022-07-27 14:33:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:bpf_trampoline_put

函数原型:void bpf_trampoline_put(struct bpf_trampoline *tr)

返回类型:void

参数:

类型参数名称
struct bpf_trampoline *tr
241  如果非tr则返回
243  mutex_lock( & serializes access to trampoline_table )
244  如果非_dec_and_test - decrement a refcount and test if it is 0*@r: the refcount* Similar to atomic_dec_and_test(), it will WARN on underflow and fail to* decrement when saturated at REFCOUNT_SATURATED则转到:out
246  WARN_ON_ONCE(是互斥锁)
247  如果WARN_ON_ONCE(!hlist_empty( & list of BPF programs using this trampoline [BPF_TRAMP_FENTRY]))则转到:out
249  如果WARN_ON_ONCE(!hlist_empty( & list of BPF programs using this trampoline [BPF_TRAMP_FEXIT]))则转到:out
252  synchronize_rcu_tasks()
253  bpf_jit_free_exec( Executable image of trampoline )
254  hlist_del( & hlist for trampoline_table )
255  kfree(tr)
256  out :
257  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.
调用者
名称描述
check_attach_btf_id
bpf_prog_free_deferred