Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bpf_trampoline_put

Proto:void bpf_trampoline_put(struct bpf_trampoline *tr)

Type:void

Parameter:

TypeParameterName
struct bpf_trampoline *tr
241  If Not tr Then Return
243  mutex_lock( & serializes access to trampoline_table )
244  If Not _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 Then Go to out
246  WARN_ON_ONCE(mutex_is_locked( & serializes access to fields of this trampoline ))
247  If WARN_ON_ONCE(!hlist_empty( & list of BPF programs using this trampoline [BPF_TRAMP_FENTRY])) Then Go to out
249  If WARN_ON_ONCE(!hlist_empty( & list of BPF programs using this trampoline [BPF_TRAMP_FEXIT])) Then Go to 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.
Caller
NameDescribe
check_attach_btf_id
bpf_prog_free_deferred