Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\bpf_trace.c Create Date:2022-07-28 12:37:40
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:perf_event_detach_bpf_prog

Proto:void perf_event_detach_bpf_prog(struct perf_event *event)

Type:void

Parameter:

TypeParameterName
struct perf_event *event
1367  mutex_lock( & bpf_event_mutex)
1369  If Not prog Then Go to unlock
1372  old_array = bpf_event_rcu_dereference(prog_array)
1373  ret = bpf_prog_array_copy(old_array, prog, NULL, & new_array)
1374  If ret == -ENOENT Then Go to unlock
1376  If ret < 0 Then
1377  bpf_prog_array_delete_safe(old_array, prog)
1378  Else
1379  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization(prog_array, new_array)
1380  bpf_prog_array_free(old_array)
1383  bpf_prog_put(prog)
1384  prog = NULL
1386  unlock :
1387  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.